Frogger game for the Gameduino

Dependencies:   Gameduino mbed

Files at this revision

API Documentation at this revision

Comitter:
TheChrisyd
Date:
Thu Dec 20 21:52:30 2012 +0000
Parent:
1:768e3d3a3ba0
Child:
3:91b295944b9a
Commit message:
corrected last change which made frog move on button release.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Dec 20 21:47:34 2012 +0000
+++ b/main.cpp	Thu Dec 20 21:52:30 2012 +0000
@@ -30,13 +30,13 @@
 
     byte read() {
         byte r = 0;
-        if (down)
+        if (!down)
             r |= CONTROL_DOWN;
-        if (up)
+        if (!up)
             r |= CONTROL_UP;
-        if (left)
+        if (!left)
             r |= CONTROL_LEFT;
-        if (right)
+        if (!right)
             r |= CONTROL_RIGHT;
         byte edge = r & ~prev;
         prev = r;