![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
Diff: Snake/Snake.cpp
- Revision:
- 30:461231877c89
- Parent:
- 25:e827f1a8fadc
- Child:
- 32:3a3bdeffdf62
diff -r c6358c39a70e -r 461231877c89 Snake/Snake.cpp --- a/Snake/Snake.cpp Sun Apr 14 10:24:59 2019 +0000 +++ b/Snake/Snake.cpp Mon Apr 15 06:00:01 2019 +0000 @@ -16,14 +16,12 @@ {1,0,1}, {0,1,0}, }; - -int m = 0; //Variable used to allow a starting location for the player. - void Snake::init() { _speed = 1;// change this according to the options selected + m = 0; //Variable used to allow a starting location for the player. } @@ -69,6 +67,7 @@ lcd.printString("Press Start",10,3); lcd.printString("to Proceed",12,4); lcd.refresh(); + pad.init(); while ( pad.check_event(Gamepad::START_PRESSED) == false) { pad.leds_on(); pad.tone(rand()%1001,0.1); //helps to set max freq for random sound