Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 15, 2020 04:21
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/ae7b0fc5f7842d956354946893742573 to your computer and use it in GitHub Desktop.
Save parzibyte/ae7b0fc5f7842d956354946893742573 to your computer and use it in GitHub Desktop.
// Calcula coordenadas aleatorias para colocar la comida
void randomizarComida() {
comidaX = random(0, ANCHURA_TABLERO);
comidaY = random(0, ALTURA_TABLERO);
}
// Coloca la comida en el escenrio
void acomodarComida() {
escenario[comidaY][comidaX] = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment