Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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