Projekt/snake_main.c
bool check_tail(uint16_t x, uint16_t y){
    int i;
    //iterate through each block and see if x0,y0 are the same as those of the head - in that case we collided
    for (i = 1; i < snake.num_blocks; i++){
      if(x == snake.blocks_array[i].x0 && y == snake.blocks_array[i].y0){
        return true;
      }
    }
    return false;
    
  }
/*helper that returns whether or not we collided with our tail*/
helper that returns whether or not we collided with our tail
helper that returns whether or not we collided with our tail
bool check_tail(uint16_t x, uint16_t y){
    int i;
    for (i = 1; i < snake.num_blocks; i++){
      if(x == snake.blocks_array[i].x0 && y == snake.blocks_array[i].y0){
        return true;
      }
    }
    return false;
  }
bool check_tail ( uint16_t x , uint16_t y ) { int i ; for ( i = 1 ; i < snake . num_blocks ; i ++ ) { if ( x == snake . blocks_array [ i ] . x0 && y == snake . blocks_array [ i ] . y0 ) { return true ; } } return false ; }
helper that returns whether or not we collided with our tail
helper that returns whether or not we collided with our tail
//iterate through each block and see if x0,y0 are the same as those of the head - in that case we collided