project for 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
snake.cpp@6:492048165bba, 2020-11-24 (annotated)
- Committer:
- kblake9
- Date:
- Tue Nov 24 11:10:42 2020 +0000
- Revision:
- 6:492048165bba
- Parent:
- 2:4947d6a82971
- Child:
- 7:1912b4a2e4fe
forgot to make snakey boy oop
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DCchico | 2:4947d6a82971 | 1 | // Copyright 2020 Georgia Tech. All rights reserved. |
DCchico | 2:4947d6a82971 | 2 | // The materials provided by the instructor in this course are for |
DCchico | 2:4947d6a82971 | 3 | // the use of the students currently enrolled in the course. |
DCchico | 2:4947d6a82971 | 4 | // Copyrighted course materials may not be further disseminated. |
DCchico | 2:4947d6a82971 | 5 | // This file must not be made publicly available anywhere. |
DCchico | 2:4947d6a82971 | 6 | |
DCchico | 1:10330bce85cb | 7 | #include "snake.h" |
DCchico | 1:10330bce85cb | 8 | |
DCchico | 1:10330bce85cb | 9 | void snake_init (Snake * s) |
DCchico | 1:10330bce85cb | 10 | { |
kblake9 | 6:492048165bba | 11 | s->head_x = 10; |
kblake9 | 6:492048165bba | 12 | s->head_y = 10; |
kblake9 | 6:492048165bba | 13 | s->head_px = 0; |
kblake9 | 6:492048165bba | 14 | s->head_py = 0; |
kblake9 | 6:492048165bba | 15 | s->length = 2; |
kblake9 | 6:492048165bba | 16 | s->locations[0]->x = 0; |
kblake9 | 6:492048165bba | 17 | s->locations[0]->y = 0; |
kblake9 | 6:492048165bba | 18 | s->score = 0; |
DCchico | 1:10330bce85cb | 19 | } |