Skip to content

Commit f12582f

Browse files
committed
Removed methods that calculated victory point totals without cards
1 parent 5102ac7 commit f12582f

File tree

4 files changed

+0
-28
lines changed

4 files changed

+0
-28
lines changed

include/Player.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ class Player {
7373

7474
std::tuple<float, float, float> getColor() const;
7575

76-
int getVictoryPointsWithoutCards();
77-
int getVictoryPointCards();
78-
7976
int getDevCardsInHand();
8077

8178
bool buyCard(std::unique_ptr<DevelopmentCard> &card);

src/Player.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,6 @@ void Player::updateVictoryPoints()
309309
victoryPoints = sum_points;
310310
}
311311

312-
/**
313-
* The number of victory points a player has, not counting victory point cards.
314-
* @return Victory points sans cards.
315-
*/
316-
int Player::getVictoryPointsWithoutCards()
317-
{
318-
updateVictoryPoints();
319-
return victoryPoints - developmentCards[VICTORYPOINT];
320-
}
321-
322312
/**
323313
* The number of victory points a player has.
324314
*/
@@ -329,16 +319,6 @@ int Player::getVictoryPoints()
329319
}
330320

331321

332-
/**
333-
* The number of victory points the player has from victory point cards.
334-
* @return Victory points from cards.
335-
*/
336-
int Player::getVictoryPointCards()
337-
{
338-
return developmentCards[VICTORYPOINT];
339-
}
340-
341-
342322
/**
343323
* Acquire a development card.
344324
* @param card An owning pointer to the card the player acquired.

tests/test_DevelopmentCards.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,12 @@ TEST(DevCardTest, RoadBuildingCard){
9898
}
9999

100100
void testVictoryPointCard(Player & test_player, bool correct_result){
101-
int prevPoints = test_player.getVictoryPointsWithoutCards();
102101
int prevCards = test_player.getVictoryCards();
103102

104103
ASSERT_EQ(test_player.playVictoryCard(), correct_result);
105104
if(correct_result){
106-
ASSERT_EQ(prevPoints, test_player.getVictoryPointsWithoutCards() -1);
107105
ASSERT_EQ(prevCards, test_player.getVictoryCards()+1);
108106
}else{
109-
ASSERT_EQ(prevPoints, test_player.getVictoryPointsWithoutCards());
110107
ASSERT_EQ(prevCards, test_player.getVictoryCards());
111108
}
112109

tests/test_Player.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ TEST(PlayerTest, UpdateVictoryPoints_VictoryCards){
283283
Player& test_player = test_board.getPlayer(0);
284284

285285
ASSERT_EQ(test_player.getVictoryPoints(), 0);
286-
ASSERT_EQ(test_player.getVictoryPointsWithoutCards(), 0);
287286

288287
std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
289288
test_player.addOre(1);
@@ -292,7 +291,6 @@ TEST(PlayerTest, UpdateVictoryPoints_VictoryCards){
292291

293292
test_player.buyCard(test_VictoryCard);
294293
ASSERT_EQ(test_player.getVictoryPoints(), 1);
295-
ASSERT_EQ(test_player.getVictoryPointsWithoutCards(), 0);
296294
}
297295

298296
TEST(PlayerTest, UpdateVictoryPoints_LargestArmy){

0 commit comments

Comments
 (0)