Newer
Older
Grégoire Payen de La Garanderie
committed
#ifndef TABLE_H_INCLUDED
#define TABLE_H_INCLUDED
#include <QWidget>
#include "TableGraphics.h"
#include "XMLReader.h"
#include "sensors.h"
Victor Dubois
committed
//#include "bougie.h"
Grégoire Payen de La Garanderie
committed
class MainWindow;
class Table : public QWidget, public Singleton<Table>
Grégoire Payen de La Garanderie
committed
{
Grégoire Payen de La Garanderie
committed
private:
int dt;
Xavier CORBILLON
committed
std::vector<class Objet*> objets;
Grégoire Payen de La Garanderie
committed
std::vector<class Robot*> robots;
b2World world;
b2Body* tableBody;
TableGraphics tableGraphics;
Grégoire Payen de La Garanderie
committed
void addCard(unsigned int n, int column);
MainWindow* mainWindow;
Grégoire Payen de La Garanderie
committed
static const int tableWidth = 3000;
static const int tableHeight = 2000;
Victor Dubois
committed
//Bougie p_bougies[20];
//Bougie p_balles[20];
Grégoire Payen de La Garanderie
committed
//static const int tableWidth = 2100;
//static const int tableHeight = 3000;
Table(MainWindow* mainWindow, QWidget* parent = 0, bool isBlue = true);
Grégoire Payen de La Garanderie
committed
virtual ~Table();
void update(int dt);
Grégoire Payen de La Garanderie
committed
void paintEvent(QPaintEvent* evt);
void keyPressEvent(QKeyEvent* evt, bool press);
void mousePressEvent(QMouseEvent* evt, bool press);
float getDistanceToObject(Position pos);
void removeClosestObject(Position pos);
Robot* getMainRobot();
Grégoire Payen de La Garanderie
committed
};
#endif