2016-03-08 18:23:35 +00:00
|
|
|
#ifndef DEF_PAYER_H
|
|
|
|
|
|
|
|
#define DEF_PAYER_H
|
|
|
|
|
|
|
|
/* [1] Libs
|
|
|
|
=========================================================*/
|
|
|
|
/* (1) Internes */
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
/* (2) Externes */
|
|
|
|
#include "term.h"
|
|
|
|
#include "Pieces/PieceFactory.h"
|
|
|
|
|
|
|
|
/* (3) Namespace */
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
/* [2] Definition
|
|
|
|
=========================================================*/
|
|
|
|
class Player{
|
|
|
|
public:
|
|
|
|
Player(bool first);
|
|
|
|
|
|
|
|
// GETTERS
|
|
|
|
bool _first;
|
|
|
|
bool owns(Piece& p) const;
|
|
|
|
Piece* at(const int x, const int y) ;
|
|
|
|
|
|
|
|
// SETTERS
|
|
|
|
void addPiece(Piece& p);
|
|
|
|
void remPiece(Piece& p);
|
|
|
|
void initPieces();
|
|
|
|
|
|
|
|
private:
|
|
|
|
vector<Piece*> _pieces;
|
|
|
|
vector<Piece*> _cimetery;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* [n] Inclusion du corps
|
|
|
|
=========================================================*/
|
2016-03-08 22:39:21 +00:00
|
|
|
#include "Player.cpp"
|
2016-03-08 18:23:35 +00:00
|
|
|
|
|
|
|
#endif
|