hgftf
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
snake.cpp
- Committer:
- ajorgih3
- Date:
- 2020-11-18
- Revision:
- 5:5953ca12205d
- Parent:
- 3:bb6f73642f01
File content as of revision 5:5953ca12205d:
// Copyright 2020 Georgia Tech. All rights reserved. // The materials provided by the instructor in this course are for // the use of the students currently enrolled in the course. // Copyrighted course materials may not be further disseminated. // This file must not be made publicly available anywhere. #include "snake.h" void snake_init (Snake * s) { s->score = 0; s->length = 3; s->head_px = 0; s->head_py = 0; s->head_y = 0; s->head_x = 0; s->tail_x = 0; s->tail_y = 0; s->tail_px = 0; s->tail_py = 0; s->body_px = 0; s->body_py = 0; s->body_y = 0; s->body_x = 0; s->locations[0].x = 0; s->locations[0].y = 0; s->locations[1].x = 0; s->locations[1].y = 0; //for (int i = 0; i < SNAKE_MAX_LENGTH; i++) { // s->locations[i].x = 0; //s->locations[i].y = 0; //} s->score = 0; }