Commit 5c7c303c authored by Corentin Guillevic's avatar Corentin Guillevic
Browse files

Small refactoring ; Add some tests to upgrade the PowerApplicator cover

parent 350118ed
......@@ -758,7 +758,7 @@ public class Game implements GameInterface {
Phase toApplied = trackingCard.getPhaseToApply();
if(toApplied.equals(state)) {
creature.removeTrackingCardToApplied(trackingCard);
applyPlayerCard(creature.getInGameId(), trackingCard, this);
applyPlayerCard(this, creature.getInGameId(), trackingCard);
trackingCardPioche.throwAway(trackingCard);
}
else {
......@@ -852,13 +852,13 @@ public class Game implements GameInterface {
traque.addSurvivalCardToApplied(survivalCard);
}
else{
applyPlayerCard(traque.getInGameId(), survivalCard, this);
applyPlayerCard(this, traque.getInGameId(), survivalCard);
traque.removeSurvivalCardToApplied(survivalCard);
survivalCardPioche.throwAway(survivalCard);
}
}
else{
applyPlayerCard(traque.getInGameId(), survivalCard, this);
applyPlayerCard(this, traque.getInGameId(), survivalCard);
traque.playSurvivalCard(survivalCard);
survivalCardPioche.throwAway(survivalCard);
}
......@@ -1066,7 +1066,7 @@ public class Game implements GameInterface {
for(Traque traque : traques) {
chosenPlaceCards = choosePlaceCardsToReveal(traque);
for(PlaceCard placeCard : chosenPlaceCards) {
resolvePlace(traque.getInGameId(), placeCard, this);
resolvePlace(this, traque.getInGameId(), placeCard);
}
sendDescription();
}
......
......@@ -28,7 +28,7 @@ class DeckTest {
@Test
public void testGetMaxCards(){
assertEquals(deck.getMaxCards(),6);
assertEquals(6,deck.getMaxCards());
}
@Test
......@@ -42,7 +42,7 @@ class DeckTest {
}
@Test
public void testclear(){
public void testClear(){
deck.clear();
assertEquals(deck.getPlayedCards(),new ArrayList<>());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment