Created
January 24, 2020 01:58
-
-
Save parzibyte/8daa491697d37d484660c8f2e1a667e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ALTURA_TABLERO 16 | |
#define ANCHURA_TABLERO 20 | |
#define MAXIMA_LONGITUD_SERPIENTE (ALTURA_TABLERO * ANCHURA_TABLERO) | |
void agregarPedazo(int x, int y) { | |
if (longitudSerpiente >= MAXIMA_LONGITUD_SERPIENTE) return; | |
if (x + 1 >= ANCHURA_TABLERO || x < 0)return; | |
if (y + 1 >= ALTURA_TABLERO || y < 0)return; | |
serpiente[longitudSerpiente] = PedazoSerpiente(x, y); | |
longitudSerpiente++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment