1919#include " GameDice.h"
2020#include " Deck.h"
2121
22- #include " DevelopmentCard.h"
22+ // #include "DevelopmentCard.h"
23+
2324
2425class GameVisitor ;
2526
@@ -36,7 +37,7 @@ class GameBoard {
3637
3738 Deck deck;
3839
39- std::map<Coordinate, std::vector<std::shared_ptr<Road>>>roads;
40+ std::map<Coordinate, std::vector<std::shared_ptr<Road>>> roads;
4041
4142 std::vector<std::unique_ptr<Player>> players;
4243 Coordinate robber;
@@ -45,11 +46,12 @@ class GameBoard {
4546 int maxVictoryPoints;
4647 int winner;
4748
48- void addResource (int x, int y, resourceType res, int val);
49- bool checkRolls (int * rolls);
49+ void addResource (int x, int y, resourceType res, int val);
50+ bool checkRolls (int * rolls);
5051
5152 bool isValidBoard () const ;
5253
54+
5355 bool outOfBounds (const Coordinate& coord) const ;
5456 bool roadExists (Coordinate start, Coordinate end) const ;
5557 bool isRoadConnectionPoint (Coordinate point, Player& Owner) const ;
@@ -63,9 +65,9 @@ class GameBoard {
6365 void createRing (Coordinate topRight, int sideLength, std::vector<resourceType>& resources, std::vector<int >& rolls);
6466 void insertTile (Coordinate location, std::vector<resourceType>& resources, std::vector<int >& rolls);
6567
66- std::pair<int , int > startTurn ();
67- void enableRobber ();
68- void payoutResources (int roll);
68+ std::pair<int , int > startTurn ();
69+ void enableRobber ();
70+ void payoutResources (int roll);
6971
7072public:
7173 GameBoard (const std::vector<std::string>& playerNames);
@@ -82,7 +84,7 @@ class GameBoard {
8284 void save (std::ostream& out);
8385
8486 void buyCard (Player& owner);
85- void discardCard (DevelopmentCard * card);
87+ void discardCard (DevCardType card);
8688
8789 ResourceTile& getResourceTile (Coordinate location) const ;
8890
@@ -138,11 +140,11 @@ class GameBoard {
138140 int getNoOfPlayers ();
139141 Player& getPlayer (int index);
140142
141- bool testRollChecking (int * rolls);
143+ bool testRollChecking (int * rolls);
142144
143- bool moveRobber (Coordinate newRobber);
144- Coordinate getRobber () const ;
145- bool canRobberRob (Player& opponent, Coordinate location);
145+ bool moveRobber (Coordinate newRobber);
146+ Coordinate getRobber () const ;
147+ bool canRobberRob (Player& opponent, Coordinate location);
146148
147149};
148150
0 commit comments