Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ll16j23s_test_docs
Diff: SnakeEngine/SnakeEngine.cpp
- Revision:
- 14:2dfe04ced21c
- Parent:
- 13:7b7ec5db56b2
--- a/SnakeEngine/SnakeEngine.cpp Wed May 27 00:59:14 2020 +0000
+++ b/SnakeEngine/SnakeEngine.cpp Wed May 27 03:18:16 2020 +0000
@@ -37,8 +37,7 @@
//printf("Dead!");
game_state = 4; //sets game_state to death, which changes the active while loop in main.cpp
death_init(pad, lcd); //displays death menu
- }
- //snake-wall collision
+ }
}
void SnakeEngine::snake_food_collision(Gamepad &pad, N5110 &lcd) {
@@ -58,7 +57,7 @@
}
void SnakeEngine::map_run(N5110 &lcd) {
- switch(_map_select+1) { //selects chosen map
+ switch(_map_select + 1) { //selects chosen map
case 2:
map2_draw(lcd);
snake_map2_collision();
@@ -176,7 +175,7 @@
transition_black(lcd);
transition_white(lcd);
lcd.refresh();
- //printf("Menu 2\n");
+ //printf("Menu 1\n");
lcd.printString("SNAKE",27,0); //displays relevant text
lcd.printString("Play",30,2);
lcd.drawCircle(24,19,3,FILL_TRANSPARENT); //draws empty circles for option display
@@ -277,7 +276,8 @@
game_init(pad, lcd, mag);
game_state = 3;
} else {
- menu2_init(pad, lcd);
+ menu2_init(pad, lcd);
+ menu_flash(pad, 2);
game_state = 2;
}
}