project for 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: snake.cpp
- Revision:
- 6:492048165bba
- Parent:
- 2:4947d6a82971
- Child:
- 7:1912b4a2e4fe
diff -r cd2bdbfedd21 -r 492048165bba snake.cpp --- a/snake.cpp Tue Nov 24 10:59:59 2020 +0000 +++ b/snake.cpp Tue Nov 24 11:10:42 2020 +0000 @@ -8,5 +8,12 @@ void snake_init (Snake * s) { - + s->head_x = 10; + s->head_y = 10; + s->head_px = 0; + s->head_py = 0; + s->length = 2; + s->locations[0]->x = 0; + s->locations[0]->y = 0; + s->score = 0; }