#ifndef GAME_H #define GAME_H #include #include "String.h" #include "Types.h" class Game final { public: enum FieldState { BLACK, WHITE, EMPTY }; Game(); void parse(); private: void consumeLine() const; void consumeLine(uint index); void parseFields(); void selectStone(); void selectLocationToMove(); void selectStoneToTake(); bool isInRange(int x, int y) const; void print(String& s) const; void printLine(String& s, int index) const; int getRank(int x, int y, int x2, int y2) const; bool areNeighbours(int x, int y, int x2, int y2) const; void addLocation(int x, int y); bool isInQueue(int x, int y) const; FieldState fields[9][5]; int activeX; int activeY; int directionX; int directionY; struct Location { int x; int y; }; std::array lastLocations; uint lastLocation; }; #endif