Matis Requis 201241242
Dependencies: mbed
Tempest Game
Game Screen
The board is made of 12 columns. The Hero stays at the top of the column
Game Controls
To control the hero spaceship point the joystick to the column you want the hero to go to.
Press the A button to shoot a bullet in the column you are currently in.
Diff: main.cpp
- Revision:
- 4:8e3ba8d6d915
- Parent:
- 2:d59a92e65bd9
- Child:
- 10:2ae9d4145410
diff -r 54132cf073d7 -r 8e3ba8d6d915 main.cpp --- a/main.cpp Thu May 21 07:10:22 2020 +0000 +++ b/main.cpp Fri May 22 10:29:49 2020 +0000 @@ -29,22 +29,30 @@ int main() { - int fps = 10; + int fps = 5; init(); render(); wait(1.0f/fps); + + while (1) { + tempest.read_input(pad); + tempest.update(); + render(); + wait(1.0f/fps); + } } void init() { lcd.init(); pad.init(); - tempest.init(12, 1); + tempest.init(); + } void render() { lcd.clear(); tempest.draw(lcd); lcd.refresh(); -} \ No newline at end of file +}