@@ -285,12 +285,12 @@ TEST(PlayerTest, UpdateVictoryPoints_VictoryCards){
285285 ASSERT_EQ (test_player.getVictoryPoints (), 0 );
286286 ASSERT_EQ (test_player.getVictoryPointsWithoutCards (), 0 );
287287
288- std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard ());
288+ // std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
289289 test_player.addOre (1 );
290290 test_player.addWheat (1 );
291291 test_player.addWool (1 );
292292
293- test_player.buyCard (test_VictoryCard );
293+ test_player.buyCard (VICTORYPOINT );
294294 ASSERT_EQ (test_player.getVictoryPoints (), 1 );
295295 ASSERT_EQ (test_player.getVictoryPointsWithoutCards (), 0 );
296296}
@@ -306,10 +306,10 @@ TEST(PlayerTest, UpdateVictoryPoints_LargestArmy){
306306 test_player.addWheat (3 );
307307 test_player.addWool (3 );
308308
309- std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard ());
310- test_player.buyCard (test_KnightCard );
311- test_player.buyCard (test_KnightCard );
312- test_player.buyCard (test_KnightCard );
309+ // std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard());
310+ test_player.buyCard (KNIGHT );
311+ test_player.buyCard (KNIGHT );
312+ test_player.buyCard (KNIGHT );
313313
314314 test_board.PlaceSettlement (Coordinate (0 ,0 ), opponent);
315315
@@ -345,18 +345,18 @@ TEST(PlayerTest, UpdateVictoryPoints_all){
345345
346346 ASSERT_EQ (test_player.getVictoryPoints (), 4 );
347347
348- std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard ());
348+ // std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
349349 test_player.addOre (4 );
350350 test_player.addWheat (4 );
351351 test_player.addWool (4 );
352352
353- test_player.buyCard (test_VictoryCard );
353+ test_player.buyCard (VICTORY );
354354 ASSERT_EQ (test_player.getVictoryPoints (), 5 );
355355
356- std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard ());
357- test_player.buyCard (test_KnightCard );
358- test_player.buyCard (test_KnightCard );
359- test_player.buyCard (test_KnightCard );
356+ // std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard());
357+ test_player.buyCard (KNIGHT );
358+ test_player.buyCard (KNIGHT );
359+ test_player.buyCard (KNIGHT );
360360
361361 test_board.PlaceSettlement (Coordinate (0 ,5 ), opponent);
362362
@@ -378,8 +378,8 @@ TEST(PlayerTest, Monopoly_card_1){
378378
379379 tp1.addMultiple (0 ,0 ,1 ,1 ,1 );
380380
381- std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard ());
382- tp1.buyCard (test_MonopolyCard );
381+ // std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
382+ tp1.buyCard (MONOPOLY );
383383
384384
385385 tp1.addMultiple (5 ,5 ,5 ,5 ,5 );
@@ -401,8 +401,8 @@ TEST(PlayerTest, Monopoly_card_2){
401401
402402 tp1.addMultiple (0 ,0 ,1 ,1 ,1 );
403403
404- std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard ());
405- tp1.buyCard (test_MonopolyCard );
404+ // std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
405+ tp1.buyCard (MONOPOLY );
406406
407407 tp1.addMultiple (0 ,0 ,0 ,1 ,1 );
408408 tp2.addMultiple (1 ,1 ,0 ,0 ,0 );
@@ -423,8 +423,8 @@ TEST(PlayerTest, Monopoly_card_false){
423423 Player& tp1 = board.getPlayer (0 );
424424 Player& tp2 = board.getPlayer (1 );
425425
426- std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard ());
427- tp1.buyCard (test_MonopolyCard );
426+ // std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
427+ tp1.buyCard (MONOPOLY );
428428
429429 tp1.addMultiple (0 ,0 ,0 ,1 ,1 );
430430 tp2.addMultiple (1 ,1 ,0 ,0 ,0 );
@@ -461,8 +461,8 @@ TEST(PlayerTest, Year_Of_Plenty_card){
461461
462462 tp1.addMultiple (0 ,0 ,1 ,1 ,1 );
463463
464- std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard ());
465- tp1.buyCard (test_YearOfPlentyCard );
464+ // std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard());
465+ tp1.buyCard (YEAROFPLENTY );
466466
467467 tp1.addMultiple (0 ,0 ,0 ,1 ,1 );
468468
@@ -479,8 +479,8 @@ TEST(PlayerTest, Year_Of_Plenty_card_false){
479479
480480 Player& tp1 = board.getPlayer (0 );
481481
482- std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard ());
483- tp1.buyCard (test_YearOfPlentyCard );
482+ // std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard());
483+ tp1.buyCard (YEAROFPLENTY );
484484
485485 tp1.addMultiple (0 ,0 ,0 ,1 ,1 );
486486
0 commit comments