Skip to content

Instantly share code, notes, and snippets.

Created February 15, 2020 04:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
// Saber en dónde está la comida para, más tarde, saber si la serpiente colisiona
int comidaX, comidaY;
// El puntaje. Se desborda cuando llega a 32767, creo
int puntaje = 0;
bool colisionaConComida() {
return serpiente[0].x == comidaX && serpiente[0].y == comidaY;
void loop() {
// ...
if (colisionaConComida()) {
agregarPedazo(0, 0);// De hecho la posición del pedazo no importa al momento de agregar
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment