File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff 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/* *
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments