Skip to content

Commit 45e13f9

Browse files
author
ankit21
committed
/
1 parent d53b987 commit 45e13f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Player.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ bool Player::playYearOfPlenty(int resourceType){
505505
if(developmentCards[YEAROFPLENTY] > 0){
506506
developmentCards[YEAROFPLENTY]--;
507507
addResource(resourceType, 2);
508-
board.discardCard(new YearOfPlentyCard());
508+
board.discardCard(YEAROFPLENTY);
509509
return true;
510510
}
511511
return false;
@@ -525,7 +525,7 @@ bool Player::playMonopoly(int resourceType){
525525
for(auto& player : board.getPlayers()) {
526526
addResource(resourceType, player->giveAllResources(resourceType));
527527
}
528-
board.discardCard(new MonopolyCard());
528+
board.discardCard(MONOPOLY);
529529
return true;
530530
}
531531
return false;
@@ -548,7 +548,7 @@ bool Player::playRoadBuilding(Coordinate start1, Coordinate end1, Coordinate sta
548548
board.PlaceRoad(start2, end2, *this);
549549
}
550550
developmentCards[ROADBUILDING]--;
551-
board.discardCard(new RoadBuildingCard());
551+
board.discardCard(ROADBUILDING);
552552
return true;
553553
}
554554
}

0 commit comments

Comments
 (0)