Skip to content

Commit 5efb497

Browse files
author
ankit21
committed
removed commented out lines
1 parent adcb0ec commit 5efb497

File tree

4 files changed

+1
-22
lines changed

4 files changed

+1
-22
lines changed

tests/testSerialization.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include "Serialization.h"
99
#include "GameBoard.h"
10-
//#include "DevelopmentCard.h"
1110
#include "Player.h"
1211

1312
#include "tinyxml2.h"
@@ -41,11 +40,6 @@ TEST(SerializationTest, testCardSerialization) {
4140
Player& testPlayer = testBoard.getPlayer(0);
4241

4342

44-
// std::unique_ptr<DevelopmentCard> knight_card = unique_ptr<DevelopmentCard>(new KnightCard());
45-
// std::unique_ptr<DevelopmentCard> victory_card = unique_ptr<DevelopmentCard>(new VictoryPointCard());
46-
// std::unique_ptr<DevelopmentCard> plenty_card = unique_ptr<DevelopmentCard>(new YearOfPlentyCard());
47-
// std::unique_ptr<DevelopmentCard> monopoly_card = unique_ptr<DevelopmentCard>(new MonopolyCard());
48-
// std::unique_ptr<DevelopmentCard> road_card = std::unique_ptr<DevelopmentCard>(new RoadBuildingCard());
4943

5044
testPlayer.buyCard(KNIGHT);
5145
testPlayer.buyCard(VICTORYPOINT);

tests/test_Deck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ TEST(DeckTest, deck_draw)
1616
DevCardType temp = testDeck->drawCard();
1717
ASSERT_NE(temp, NULLTYPE);
1818
testDeck->discard(temp);
19-
// temp = NULL;
20-
// delete testDeck;
19+
2120
}
2221

2322
TEST(DeckTest, reshuffle_discard_pile)

tests/test_DevelopmentCards.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include "GameBoard.h"
99
#include "GamePiece.h"
10-
//#include "DevelopmentCard.h"
1110
#include "Player.h"
1211
#include "Util.h"
1312

@@ -80,7 +79,6 @@ TEST(DevCardTest, RoadBuildingCard){
8079
Player& test_player = *test_board.getPlayers()[0];
8180

8281
test_board.PlaceSettlement(Coordinate(0,0), test_player);
83-
// std::unique_ptr<DevelopmentCard> test_card = std::unique_ptr<DevelopmentCard>(new RoadBuildingCard());
8482
DevCardType test_card = ROADBUILDING;
8583

8684
test_player.addOre(4);
@@ -116,7 +114,6 @@ TEST(DevCardTest, VictoryPointCard){
116114
GameBoard test_board({"tester1"});
117115
Player& test_player = *test_board.getPlayers()[0];
118116

119-
// std::unique_ptr<DevelopmentCard> test_card = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
120117
DevCardType test_card = VICTORYPOINT;
121118
test_player.addOre(2);
122119
test_player.addWheat(2);
@@ -156,7 +153,6 @@ TEST(DevCardTest, MonopolyCard){
156153
Player& test_player2 = test_board.getPlayer(1);
157154
Player& test_player3 = test_board.getPlayer(2);
158155

159-
// std::unique_ptr<DevelopmentCard> test_card = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
160156
DevCardType test_card = MONOPOLY;
161157

162158

@@ -206,7 +202,6 @@ TEST(DevCardTest, YearOfPlentyCard){
206202
GameBoard test_board({"tester1"});
207203
Player& test_player = test_board.getPlayer(0);
208204

209-
// std::unique_ptr<DevelopmentCard> test_card = std::unique_ptr<YearOfPlentyCard>(new YearOfPlentyCard());
210205
DevCardType test_card = YEAROFPLENTY;
211206

212207

@@ -263,7 +258,6 @@ TEST(DevCardTest, KnightCard){
263258
Player& test_player2 = test_board.getPlayer(1);
264259
Player& test_player3 = test_board.getPlayer(2);
265260

266-
// std::unique_ptr<DevelopmentCard> test_card = std::unique_ptr<DevelopmentCard>(new KnightCard());
267261
DevCardType test_card = KNIGHT;
268262

269263
test_player1.addOre(4);

tests/test_Player.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ TEST(PlayerTest, UpdateVictoryPoints_VictoryCards){
284284

285285
ASSERT_EQ(test_player.getVictoryPoints(), 0);
286286

287-
// std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
288287
test_player.addOre(1);
289288
test_player.addWheat(1);
290289
test_player.addWool(1);
@@ -304,7 +303,6 @@ TEST(PlayerTest, UpdateVictoryPoints_LargestArmy){
304303
test_player.addWheat(3);
305304
test_player.addWool(3);
306305

307-
// std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard());
308306
test_player.buyCard(KNIGHT);
309307
test_player.buyCard(KNIGHT);
310308
test_player.buyCard(KNIGHT);
@@ -343,15 +341,13 @@ TEST(PlayerTest, UpdateVictoryPoints_all){
343341

344342
ASSERT_EQ(test_player.getVictoryPoints(), 4);
345343

346-
// std::unique_ptr<DevelopmentCard> test_VictoryCard = std::unique_ptr<DevelopmentCard>(new VictoryPointCard());
347344
test_player.addOre(4);
348345
test_player.addWheat(4);
349346
test_player.addWool(4);
350347

351348
test_player.buyCard(VICTORYPOINT);
352349
ASSERT_EQ(test_player.getVictoryPoints(), 5);
353350

354-
// std::unique_ptr<DevelopmentCard> test_KnightCard = std::unique_ptr<DevelopmentCard>(new KnightCard());
355351
test_player.buyCard(KNIGHT);
356352
test_player.buyCard(KNIGHT);
357353
test_player.buyCard(KNIGHT);
@@ -376,7 +372,6 @@ TEST(PlayerTest, Monopoly_card_1){
376372

377373
tp1.addMultiple(0,0,1,1,1);
378374

379-
// std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
380375
tp1.buyCard(MONOPOLY);
381376

382377

@@ -421,7 +416,6 @@ TEST(PlayerTest, Monopoly_card_false){
421416
Player& tp1 = board.getPlayer(0);
422417
Player& tp2 = board.getPlayer(1);
423418

424-
// std::unique_ptr<DevelopmentCard> test_MonopolyCard = std::unique_ptr<DevelopmentCard>(new MonopolyCard());
425419
tp1.buyCard(MONOPOLY);
426420

427421
tp1.addMultiple(0,0,0,1,1);
@@ -459,7 +453,6 @@ TEST(PlayerTest, Year_Of_Plenty_card){
459453

460454
tp1.addMultiple(0,0,1,1,1);
461455

462-
// std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard());
463456
tp1.buyCard(YEAROFPLENTY);
464457

465458
tp1.addMultiple(0,0,0,1,1);
@@ -477,7 +470,6 @@ TEST(PlayerTest, Year_Of_Plenty_card_false){
477470

478471
Player& tp1 = board.getPlayer(0);
479472

480-
// std::unique_ptr<DevelopmentCard> test_YearOfPlentyCard = std::unique_ptr<DevelopmentCard>(new YearOfPlentyCard());
481473
tp1.buyCard(YEAROFPLENTY);
482474

483475
tp1.addMultiple(0,0,0,1,1);

0 commit comments

Comments
 (0)