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.
Revision 27:68cc4ef820f4, committed 2020-05-20
- Comitter:
- JoeShotton
- Date:
- Wed May 20 21:25:11 2020 +0000
- Parent:
- 26:a596dce2f938
- Child:
- 28:bd21eff0a18a
- Commit message:
- Redid file structure and classes. Code is largely commented out.
Changed in this revision
| SnakeEngine.cpp | Show diff for this revision Revisions of this file |
| SnakeEngine.h | Show diff for this revision Revisions of this file |
--- a/SnakeEngine.cpp Sun Apr 05 21:15:07 2020 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-
-bool collision(int state, int x, int y,) {
- if ((lcd.getPixel(x, y) == 1 && ((state == 1) || (state == 4))) || (lcd.getPixel(x+1, y+1) == 1 && ((state == 2) || (state == 3)))) {
- // checks infront of head to see if pixel is set
- // due to the size of the head, there is an offset for the check for North and Eastward directions
- pad.led(1,0.9);
- return true;
- } else {
- pad.led(1,0.0);
- return = false;
- }
-}
\ No newline at end of file
--- a/SnakeEngine.h Sun Apr 05 21:15:07 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - /** Play a single tone for the specifed duration - *@param state of movement fsm - *@param current x value of head - *@param current y value of head - */ - bool collision(int state, int x, int y,); \ No newline at end of file