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.
Engine.h
- Committer:
- musallambseiso
- Date:
- 2017-04-10
- Revision:
- 9:0efc8d7cdcf7
- Parent:
- 8:1c0bc1a08153
- Child:
- 10:b2dd5f484f98
File content as of revision 9:0efc8d7cdcf7:
#ifndef ENGINE_H #define ENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Ship1.h" #include "Ship2.h" #include "Ship3.h" #include "Ship4.h" #include "Ship5.h" #include "Ship6.h" #include "Friendly.h" #include "Bullet.h" #include "Stats.h" // gap from edge of screen #define GAP 2 class Engine { public: Engine(); ~Engine(); int collisions; int wave_counter; void init(int friendly_width,int friendly_height,int ship_size,int speed,N5110 &lcd, Gamepad &pad); void read_input(Gamepad &pad); void checker(N5110 &lcd, Gamepad &pad); void update(N5110 &lcd, Gamepad &pad); void draw(N5110 &lcd); //void shoot(N5110 &lcd, Gamepad &pad, int speed); private: void grid_draw(N5110 &lcd); void ships_draw(N5110 &lcd); void check_wall_collision(Gamepad &pad); void check_friendly_collisions(Gamepad &pad); void check_pass(Gamepad &pad); void check_death1(N5110 &lcd, Gamepad &pad); void check_death2(N5110 &lcd, Gamepad &pad); void check_death3(N5110 &lcd, Gamepad &pad); void check_death4(N5110 &lcd, Gamepad &pad); void check_death5(N5110 &lcd, Gamepad &pad); void check_death6(N5110 &lcd, Gamepad &pad); void check_death(N5110 &lcd, Gamepad &pad); void game_over(N5110 &lcd, Gamepad &pad); void wave_draw(N5110 &lcd); Friendly _friendly; int _friendly_width; int _friendly_height; int _ship_size; int _speed; int _friendlyx; Ship1 _ship1; Ship2 _ship2; Ship3 _ship3; Ship4 _ship4; Ship5 _ship5; Ship6 _ship6; Bullet _bullet; Stats _stats; Direction _d; float _mag; }; #endif