Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 24, 2020 01:58
Show Gist options
  • Save parzibyte/8daa491697d37d484660c8f2e1a667e5 to your computer and use it in GitHub Desktop.
Save parzibyte/8daa491697d37d484660c8f2e1a667e5 to your computer and use it in GitHub Desktop.
#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