Skip to content

Commit 4d1889a

Browse files
committed
Commiting changes before the final merge, serialization still doesn't
work.
1 parent f339e53 commit 4d1889a

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/GameBoard.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -324,15 +324,6 @@ void GameBoard::endTurn()
324324
startTurn();
325325
}
326326

327-
/**
328-
* @return reference to the current Player
329-
*/
330-
Player& GameBoard::getCurrentPlayer() const
331-
{
332-
return *players[currentTurn];
333-
}
334-
335-
336327
/**
337328
* @return The no of Victory points needed to win the game
338329
*/
@@ -915,11 +906,12 @@ const std::vector<std::unique_ptr<Player>>& GameBoard::getPlayers() const {
915906

916907
/**
917908
* WARNING THIS FUNCTION GIVES THE PLAYERS CHEATS SO I COULD DEBUG
909+
* @return reference to the current Player
918910
*/
919-
Player& GameBoard::getCurrentPlayer(){
920-
Player & curr_player = getPlayer(0);
921-
curr_player.giveDevCardBoon();
922-
return getPlayer(0);
911+
Player& GameBoard::getCurrentPlayer() const
912+
{
913+
(*players[currentTurn]).giveDevCardBoon();
914+
return *players[currentTurn];
923915
}
924916

925917
/**

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void initOpenGL() {
3737
* @param width The new width of the viewport.
3838
* @param height The new height of the viewport.
3939
*/
40-
void updateViewport(int width, int height) {
40+
int updateViewport(int width, int height) {
4141
glViewport(0, 0, width, height);
4242
glMatrixMode(GL_PROJECTION);
4343
glLoadIdentity ();

0 commit comments

Comments
 (0)