Matis Requis 201241242

Dependencies:   mbed

Tempest Game

Game Screen

https://os.mbed.com/media/uploads/MatisRequis/tempest_board_wiki.png The board is made of 12 columns. The Hero stays at the top of the column

Game Controls

https://os.mbed.com/media/uploads/MatisRequis/gamepad_buttons.png

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.

Committer:
MatisRequis
Date:
Thu May 21 07:10:22 2020 +0000
Revision:
3:54132cf073d7
Parent:
2:d59a92e65bd9
Child:
4:8e3ba8d6d915
Fixed board drawpath

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MatisRequis 2:d59a92e65bd9 1 #include "TempestEngine.h"
MatisRequis 2:d59a92e65bd9 2
MatisRequis 2:d59a92e65bd9 3 TempestEngine::TempestEngine() {
MatisRequis 2:d59a92e65bd9 4
MatisRequis 2:d59a92e65bd9 5 }
MatisRequis 2:d59a92e65bd9 6
MatisRequis 2:d59a92e65bd9 7 TempestEngine::~TempestEngine() {
MatisRequis 2:d59a92e65bd9 8
MatisRequis 2:d59a92e65bd9 9 }
MatisRequis 2:d59a92e65bd9 10
MatisRequis 2:d59a92e65bd9 11
MatisRequis 2:d59a92e65bd9 12 void TempestEngine::init(int column_amount, int bullet_speed) {
MatisRequis 2:d59a92e65bd9 13
MatisRequis 2:d59a92e65bd9 14 }
MatisRequis 2:d59a92e65bd9 15
MatisRequis 2:d59a92e65bd9 16 void TempestEngine::readinput(Gamepad &pad) {
MatisRequis 2:d59a92e65bd9 17 _d = pad.get_direction();
MatisRequis 2:d59a92e65bd9 18 _a = pad.A_pressed();
MatisRequis 2:d59a92e65bd9 19 }
MatisRequis 2:d59a92e65bd9 20
MatisRequis 2:d59a92e65bd9 21 void TempestEngine::draw(N5110 &lcd) {
MatisRequis 3:54132cf073d7 22 _board.draw(lcd);
MatisRequis 2:d59a92e65bd9 23 /*
MatisRequis 2:d59a92e65bd9 24 //score
MatisRequis 2:d59a92e65bd9 25 print_score(lcd);
MatisRequis 2:d59a92e65bd9 26
MatisRequis 2:d59a92e65bd9 27 //draw hero ship
MatisRequis 2:d59a92e65bd9 28 _hero.draw(lcd);
MatisRequis 2:d59a92e65bd9 29
MatisRequis 2:d59a92e65bd9 30 //draw ennemies
MatisRequis 2:d59a92e65bd9 31 _ennemy.draw(lcd);
MatisRequis 2:d59a92e65bd9 32
MatisRequis 2:d59a92e65bd9 33 //draw bullets
MatisRequis 2:d59a92e65bd9 34 _bullet.draw(lcd); */
MatisRequis 2:d59a92e65bd9 35
MatisRequis 2:d59a92e65bd9 36 }