#ifndef CIV_BORDERS_H
#define CIV_BORDERS_H
#include "constants.h"
#include <list>
class Game;
class Board;
class BorderSides
{
private:
bool NeedToDrawLine[4];
bool allFalse();
bool allTrue();
friend class BorderVertex;
};
class BorderVertex
{
private:
std::vector<sf::VertexArray> Lines;
BorderSides TileSides[NUMBER_OF_TILES];
std::list<int> TilesToAddBorder;
bool RemovedElements;//for removing elements of tilestoaddborder list
static const int BackLeftSide = 0;
static const int BackRightSide = 1;
static const int FrontLeftSide = 2;
static const int FrontRightSide = 3;
int PointIndex, StartingPoint, StartingTile;
void determineSidesWhichNeedBorder(int TileNumber, Board &BoardObject);
bool setTileBorder(int TileNumber, sf::Color ColorToAssign, Board &Theboard, int WhichNeighbor);//remove elements here, set to begin
void getNextTileForLine(int &TileNumber, int &WhichNeighbor, int TileOwner, Board &TheBoard);
bool isValidNextTile(int TileNumber, int WhichNeighbor);
bool isTileOnAddBorderList(int TileNumber);
bool removElementFromTilesToAddBorder(int TileToRemove);
public:
void updateLines(Game *GameObject, const std::vector<int> &TilesOnScreen);
friend class SFML_Program;
};
#endif