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.
Dependencies: mbed
SpaceRebEngine/SpaceRebEngine.h
- Committer:
- henririgby98
- Date:
- 2019-05-08
- Revision:
- 7:e0cab3e73df9
- Parent:
- 5:0da65740cd5e
- Child:
- 17:e749cac05270
File content as of revision 7:e0cab3e73df9:
#ifndef SPACEREBENGINE_H #define SPACEREBENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "SpaceInvader.h" #include "Missiles.h" class SpaceRebEngine { public: SpaceRebEngine(); ~SpaceRebEngine(); void init(int spaceinvader_width,int spaceinvader_height,int missiles_size,int speed); void read_input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); void print_scores(N5110 &lcd); bool game_end(); private: void check_spaceinvader_collision(Gamepad &pad); void check_wall_collision(Gamepad &pad); SpaceInvader _player; int _spaceinvader_width; int _spaceinvader_height; int _missiles_size; int _speed; int _score; bool _end; Missiles _missiles; Direction _d; float _mag; }; #endif