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
SpaceInvaderEngine/SpaceInvaderEngine.h
- Committer:
- josh_ohara
- Date:
- 2020-03-24
- Revision:
- 7:06a2558155f0
- Parent:
- 6:5bea67cc96f9
- Child:
- 8:86cb9a9f8a73
File content as of revision 7:06a2558155f0:
#ifndef SPACEINVADERENGINE_H #define SPACEINVADERENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "BulletS.h" #include "Ship.h" #include "Alien.h" #define BORDER 2 class SpaceInvaderEngine { public: SpaceInvaderEngine(); void init(int ship_height, int ship_width, int ship_bullet_size, int alien_size); void read_input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); private: void read_input(Gamepad &pad); void draw(N5110 &lcd); void check_alien_collision(Gamepad &pad); Alien A1; Ship S1; BulletS BS1; int S1_height; int S1_width; int A1_size; int BS1_size; int A1y; int BS1x; Direction D; float Mag; }; #endif