40 lines
754 B
C++
40 lines
754 B
C++
#ifndef GUARD_GAME
|
|
#define GUARD_GAME
|
|
#include <vector>
|
|
#include "mingl/mingl.h"
|
|
#include "drawEngine.h"
|
|
#include "config.h"
|
|
#include "utils.h"
|
|
#include "pos.h"
|
|
|
|
using namespace std;
|
|
|
|
class Game {
|
|
private:
|
|
DrawEngine drawer;
|
|
Config conf;
|
|
unsigned baseX;
|
|
unsigned baseY;
|
|
aliensGrid grid;
|
|
vector<pos> missiles;
|
|
vector<pos> torpedos;
|
|
pos player;
|
|
|
|
void managePlayer();
|
|
bool manageInvaders();
|
|
void display();
|
|
unsigned manageAllCollisions();
|
|
void remCollidingProjectiles();
|
|
void moveMissiles();
|
|
void moveTorpedos();
|
|
public:
|
|
// in case someone wants to mess with the code, here's a minimal API, costs nothing to us
|
|
Game();
|
|
void managedGames();
|
|
unsigned playGame();
|
|
void initialMenuHandler();
|
|
void deathMenuHandler();
|
|
|
|
};
|
|
|
|
#endif |