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.
Diff: Menu/Menu.cpp
- Revision:
- 12:d3eef5ea3f43
- Parent:
- 11:b25874e7efe4
- Child:
- 13:81573be8fac6
--- a/Menu/Menu.cpp Mon May 07 00:10:25 2018 +0000 +++ b/Menu/Menu.cpp Mon May 07 18:06:50 2018 +0000 @@ -99,7 +99,7 @@ _buttonPressed = true; wait(0.1); } - _d = pad.get_direction(); + _d = pad.get_direction(); } @@ -114,6 +114,20 @@ lcd.printString(">",2,_mainSelection); + int _snake[8][40] = { + { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + { 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + { 0,0,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + { 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,0}, + { 0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0}, + { 0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0}, + { 0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} + + }; + + lcd.drawSprite(10,35,8,40,(int *)_snake); + } else if ( _menuScreen == "dif") { lcd.printString(" Easy",2,1); @@ -142,3 +156,8 @@ { return _difficulty; } + +int Menu::getLvl() +{ + return _level; +}