![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Owen Cavender 201159294
Diff: GameEngine.cpp
- Revision:
- 10:ee781d18e0f6
- Parent:
- 9:a69a6a06dddf
- Child:
- 11:e7c56013acd9
- Child:
- 12:60c856354406
--- a/GameEngine.cpp Thu May 28 19:16:52 2020 +0000 +++ b/GameEngine.cpp Thu May 28 20:58:49 2020 +0000 @@ -10,16 +10,6 @@ } - -void GameEngine::print_display_time(N5110 &lcd) -{ - int countdown = _realtime; - - char buffer1[14]; - sprintf(buffer1,"%2d",countdown); - lcd.printString(buffer1,WIDTH/2,1); // font is 8 wide, so leave 4 pixel gape from middle assuming two digits - char buffer2[14]; -} void GameEngine::print_scores(N5110 &lcd, Snake &snake) { int score = snake.get_score(); @@ -44,20 +34,30 @@ // top right led on pad.led(4, 1); + wait(0.2); + pad.led(4, 0); } // topleft led on if (_x0 <= 42 && _y0 >=24) { // top right led on pad.led(1, 1); + wait(0.2); + pad.led(1, 0); } //bottom left if (_x0 <=42 && _y0 <= 24) { pad.led(3,1); + wait(0.2); + pad.led(3, 0); } //bottom right if (_x0 >= 42 && _y0 <= 24) { // top right led on pad.led(6, 1); + wait(0.2); + pad.led(6, 0); } + else { } +} \ No newline at end of file