@@ -35,12 +35,12 @@ class GameBoard {
3535 std::vector<std::unique_ptr<Player>> players;
3636 Coordinate robber;
3737
38-
38+
3939 void addResource (int x, int y, resourceType res, int val);
4040 bool checkRolls (int * rolls);
41-
41+
4242 bool isValidBoard () const ;
43-
43+
4444
4545 bool verifyRoadPlacement (Coordinate start, Coordinate end, Player& Owner) const ;
4646 bool outOfBounds (const Coordinate& coord) const ;
@@ -52,7 +52,7 @@ class GameBoard {
5252
5353 void removeRoadEnd (std::shared_ptr<Road> startRoad);
5454 int FindLongestRoad_FromPoint (Coordinate curr, const Player & owner, std::map<Coordinate, bool >& marked, std::map<Road*, bool >& markedRoads, int length) const ;
55-
55+
5656 void createRing (Coordinate topRight, int sideLength, std::vector<resourceType>& resources, std::vector<int >& rolls);
5757 void insertTile (Coordinate location, std::vector<resourceType>& resources, std::vector<int >& rolls);
5858
@@ -61,15 +61,15 @@ class GameBoard {
6161 void payoutResources (int roll);
6262
6363public:
64- GameBoard (std::vector<std::unique_ptr<Player>>&& players );
65- GameBoard (std::vector<std::unique_ptr<Player>>&& players , const std::map<Coordinate, std::pair<resourceType, int >>& resourceLocations);
64+ GameBoard (const std::vector<std::string>& playerNames );
65+ GameBoard (const std::vector<std::string>& playerNames , const std::map<Coordinate, std::pair<resourceType, int >>& resourceLocations);
6666 GameBoard (std::istream& in);
6767 GameBoard (GameBoard&) = delete ;
6868 ~GameBoard ();
6969 GameBoard& operator =(GameBoard&) = delete ;
70-
70+
7171 void save (std::ostream& out);
72-
72+
7373 ResourceTile& getResourceTile (Coordinate location) const ;
7474
7575 const std::map<Coordinate, std::unique_ptr<ResourceTile>>& getResources () const ;
@@ -78,7 +78,7 @@ class GameBoard {
7878
7979 const std::shared_ptr<Road> getRoad (Coordinate start, Coordinate end) const ;
8080 const std::vector<std::shared_ptr<Road>>& getRoads (Coordinate loc) const ;
81-
81+
8282 int FindLongestRoad (const Player & owner) const ;
8383
8484 std::vector<Settlement*> GetNeighboringSettlements (Coordinate location) const ;
@@ -96,13 +96,16 @@ class GameBoard {
9696 // void PlaceSettlement(Coordinate location, Player& Owner);
9797 void PlaceCity (Coordinate location, Player& Owner);
9898 bool PlaceRoad (Coordinate start, Coordinate end, Player& Owner);
99-
99+
100100 void accept (GameVisitor& visitor);
101-
101+
102102 bool operator ==(const GameBoard& other) const ;
103-
103+
104104 const std::vector<std::unique_ptr<Player>>& getPlayers () const ;
105-
105+
106+ int getNoOfPlayers ();
107+ Player& getPlayer (int index);
108+
106109 bool testRollChecking (int * rolls);
107110
108111 void moveRobber (Coordinate newRobber);
0 commit comments