@@ -38,12 +38,12 @@ class GameBoard {
3838 std::vector<std::unique_ptr<Player>> players;
3939 Coordinate robber;
4040
41-
41+
4242 void addResource (int x, int y, resourceType res, int val);
4343 bool checkRolls (int * rolls);
44-
44+
4545 bool isValidBoard () const ;
46-
46+
4747
4848 bool verifyRoadPlacement (Coordinate start, Coordinate end, Player& Owner) const ;
4949 bool outOfBounds (const Coordinate& coord) const ;
@@ -55,7 +55,7 @@ class GameBoard {
5555
5656 void removeRoadEnd (std::shared_ptr<Road> startRoad);
5757 int FindLongestRoad_FromPoint (Coordinate curr, const Player & owner, std::map<Coordinate, bool >& marked, std::map<Road*, bool >& markedRoads, int length) const ;
58-
58+
5959 void createRing (Coordinate topRight, int sideLength, std::vector<resourceType>& resources, std::vector<int >& rolls);
6060 void insertTile (Coordinate location, std::vector<resourceType>& resources, std::vector<int >& rolls);
6161
@@ -64,15 +64,15 @@ class GameBoard {
6464 void payoutResources (int roll);
6565
6666public:
67- GameBoard (std::vector<std::unique_ptr<Player>>&& players );
68- GameBoard (std::vector<std::unique_ptr<Player>>&& players , const std::map<Coordinate, std::pair<resourceType, int >>& resourceLocations);
67+ GameBoard (const std::vector<std::string>& playerNames );
68+ GameBoard (const std::vector<std::string>& playerNames , const std::map<Coordinate, std::pair<resourceType, int >>& resourceLocations);
6969 GameBoard (std::istream& in);
7070 GameBoard (GameBoard&) = delete ;
7171 ~GameBoard ();
7272 GameBoard& operator =(GameBoard&) = delete ;
73-
73+
7474 void save (std::ostream& out);
75-
75+
7676 ResourceTile& getResourceTile (Coordinate location) const ;
7777
7878 const std::map<Coordinate, std::unique_ptr<ResourceTile>>& getResources () const ;
@@ -81,7 +81,7 @@ class GameBoard {
8181
8282 const std::shared_ptr<Road> getRoad (Coordinate start, Coordinate end) const ;
8383 const std::vector<std::shared_ptr<Road>>& getRoads (Coordinate loc) const ;
84-
84+
8585 int FindLongestRoad (const Player & owner) const ;
8686
8787 std::vector<Settlement*> GetNeighboringSettlements (Coordinate location) const ;
@@ -91,21 +91,25 @@ class GameBoard {
9191
9292 void PlaceSettlement (Coordinate location, Player& Owner);
9393 void UpgradeSettlement (Coordinate location);
94- // void PlaceRoad (Coordinate start, Coordinate end, Player& Owner );
94+ void UpgradeToWonder (Coordinate location );
9595
9696
9797 bool buyRoad (Coordinate start, Coordinate end, Player& Owner);
9898
9999 // void PlaceSettlement(Coordinate location, Player& Owner);
100100 void PlaceCity (Coordinate location, Player& Owner);
101+ void PlaceWonder (Coordinate location, Player& Owner);
101102 bool PlaceRoad (Coordinate start, Coordinate end, Player& Owner);
102-
103+
103104 void accept (GameVisitor& visitor);
104-
105+
105106 bool operator ==(const GameBoard& other) const ;
106-
107+
107108 const std::vector<std::unique_ptr<Player>>& getPlayers () const ;
108-
109+
110+ int getNoOfPlayers ();
111+ Player& getPlayer (int index);
112+
109113 bool testRollChecking (int * rolls);
110114
111115 void moveRobber (Coordinate newRobber);
0 commit comments