Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 24, 2020 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/7c6aae53883053548856df3348da582d to your computer and use it in GitHub Desktop.
Save parzibyte/7c6aae53883053548856df3348da582d to your computer and use it in GitHub Desktop.
for (int x = 0; x < 8; x++) {
int numero = 0;
int indice = cuadritoY == 0 ? x : (x + 8);
int inicio = cuadritoX * 5;
// Quién te conoce math.pow
if (prueba[indice][inicio + 0] == 1)numero += 16;
if (prueba[indice][inicio + 1] == 1)numero += 8;
if (prueba[indice][inicio + 2] == 1)numero += 4;
if (prueba[indice][inicio + 3] == 1)numero += 2;
if (prueba[indice][inicio + 4] == 1)numero += 1;
///
figura[x] = numero;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment