Fix: minor bug
This commit is contained in:
@@ -30,7 +30,7 @@ class Building11Test {
|
||||
assertEquals(EffectType.FINAL, b0.getEffectType());
|
||||
assertEquals(11, b0.getEffectId());
|
||||
assertEquals(ct, b0.getIcon());
|
||||
assertEquals(pm, b0.getprestigeMul());
|
||||
assertEquals(pm, b0.getPrestigeMul());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -56,7 +56,7 @@ class Building11Test {
|
||||
assertEquals(price, b1.getPrice());
|
||||
assertEquals(prestigeValue, b1.getPrestigeValue());
|
||||
assertEquals(ct, b1.getIcon());
|
||||
assertEquals(pm, b1.getprestigeMul());
|
||||
assertEquals(pm, b1.getPrestigeMul());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -174,7 +174,7 @@ class Building11Test {
|
||||
assertEquals(EffectType.FINAL, b11.getEffectType());
|
||||
assertEquals(11, b11.getEffectId());
|
||||
assertEquals(ct, b11.getIcon());
|
||||
assertEquals(pm, b11.getprestigeMul());
|
||||
assertEquals(pm, b11.getPrestigeMul());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+8
-8
@@ -12,7 +12,7 @@ class InventorTest {
|
||||
void icon() {
|
||||
Inventor i = new Inventor(1, 5);
|
||||
|
||||
assertEquals(5, i.Icon());
|
||||
assertEquals(5, i.getIcon());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -22,7 +22,7 @@ class InventorTest {
|
||||
|
||||
assertNotNull(s);
|
||||
assertFalse(s.contains(CharacterType.INVENTOR.toString()));
|
||||
assertEquals("ID:" + i.Icon(), s);
|
||||
assertEquals("ID:" + i.getIcon(), s);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -44,7 +44,7 @@ class InventorTest {
|
||||
assertEquals(i.getIdIMG(), clone.getIdIMG());
|
||||
assertEquals(i.getEra(), clone.getEra());
|
||||
assertEquals(i.getType(), clone.getType());
|
||||
assertEquals(i.Icon(), clone.Icon());
|
||||
assertEquals(i.getIcon(), clone.getIcon());
|
||||
assertEquals(i.getNMin(), clone.getNMin());
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class InventorTest {
|
||||
assertEquals(1, insertedInventor.getEra());
|
||||
assertEquals(5, insertedInventor.getNMin());
|
||||
assertEquals(CharacterType.INVENTOR, insertedInventor.getType());
|
||||
assertEquals(5, insertedInventor.Icon());
|
||||
assertEquals(5, insertedInventor.getIcon());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -74,7 +74,7 @@ class InventorTest {
|
||||
|
||||
assertEquals(1, i.getEra());
|
||||
assertEquals(CharacterType.INVENTOR, i.getType());
|
||||
assertEquals(5, i.Icon());
|
||||
assertEquals(5, i.getIcon());
|
||||
assertEquals(0, i.getNMin());
|
||||
assertFalse(i.isEventCard());
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class InventorTest {
|
||||
|
||||
assertEquals(1, i.getEra());
|
||||
assertEquals(CharacterType.INVENTOR, i.getType());
|
||||
assertEquals(5, i.Icon());
|
||||
assertEquals(5, i.getIcon());
|
||||
assertEquals(3, i.getNMin());
|
||||
assertFalse(i.isEventCard());
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class InventorTest {
|
||||
assertEquals("inventor1", i.getIdIMG());
|
||||
assertEquals(1, i.getEra());
|
||||
assertEquals(CharacterType.INVENTOR, i.getType());
|
||||
assertEquals(5, i.Icon());
|
||||
assertEquals(5, i.getIcon());
|
||||
assertEquals(0, i.getNMin());
|
||||
assertFalse(i.isEventCard());
|
||||
}
|
||||
@@ -109,7 +109,7 @@ class InventorTest {
|
||||
assertEquals("inventor1", i.getIdIMG());
|
||||
assertEquals(1, i.getEra());
|
||||
assertEquals(CharacterType.INVENTOR, i.getType());
|
||||
assertEquals(5, i.Icon());
|
||||
assertEquals(5, i.getIcon());
|
||||
assertEquals(3, i.getNMin());
|
||||
assertFalse(i.isEventCard());
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ class SustenanceTest {
|
||||
// Gli attributi di Sustenance era e EventType vengono testati in EventCardTest.
|
||||
|
||||
Sustenance s = new Sustenance(era, prestigeDebt);
|
||||
assertEquals(prestigeDebt, s.getprestigeDebt());
|
||||
assertEquals(prestigeDebt, s.getPrestigeDebt());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -147,7 +147,7 @@ class SustenanceTest {
|
||||
|
||||
assertEquals(era, s2.getEra());
|
||||
assertEquals(EventType.SUSTENANCE, s2.getType());
|
||||
assertEquals(prestigeDebt, s2.getprestigeDebt());
|
||||
assertEquals(prestigeDebt, s2.getPrestigeDebt());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -13,7 +13,7 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.playerUpdate(p, s);
|
||||
assertEquals(p, curr.getCurrentPlayer());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.playerUpdate(p, s);
|
||||
assertEquals(s, curr.getSlot());
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.EraUpdate();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.eraUpdate();
|
||||
assertEquals(2, curr.getEra());
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.RoundUpdate();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.roundUpdate();
|
||||
assertEquals(2, curr.getRound());
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.UpperDrawn();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.upperDrawn();
|
||||
assertEquals(-1, curr.getNUpper());
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.LowerDrawn();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.lowerDrawn();
|
||||
assertEquals(-1, curr.getNLower());
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ class CurrentStateTest {
|
||||
Slot s = new Slot('A');
|
||||
GameStages g = GameStages.RES_ACTIONS;
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.GameStageUpdate(g);
|
||||
curr.playerUpdate(p, s);
|
||||
curr.gameStageUpdate(g);
|
||||
assertEquals(g, curr.getGameStage());
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.EraUpdate();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.eraUpdate();
|
||||
assertEquals(2, curr.getEra());
|
||||
}
|
||||
|
||||
@@ -92,8 +92,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.RoundUpdate();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.roundUpdate();
|
||||
assertEquals(2, curr.getRound());
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.UpperDrawn();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.upperDrawn();
|
||||
assertEquals(-1, curr.getNUpper());
|
||||
}
|
||||
|
||||
@@ -112,9 +112,9 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('A');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.LowerDrawn();
|
||||
curr.LowerDrawn();
|
||||
curr.playerUpdate(p, s);
|
||||
curr.lowerDrawn();
|
||||
curr.lowerDrawn();
|
||||
assertEquals(-2, curr.getNLower());
|
||||
}
|
||||
|
||||
@@ -125,8 +125,8 @@ class CurrentStateTest {
|
||||
GameStages g = GameStages.RES_ACTIONS;
|
||||
CurrentState curr = new CurrentState();
|
||||
assertEquals(GameStages.WAITING, curr.getGameStage());
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.GameStageUpdate(g);
|
||||
curr.playerUpdate(p, s);
|
||||
curr.gameStageUpdate(g);
|
||||
assertEquals(GameStages.RES_ACTIONS, curr.getGameStage());
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class CurrentStateTest {
|
||||
Player p = new Player("test");
|
||||
Slot s = new Slot('C');
|
||||
CurrentState curr = new CurrentState();
|
||||
curr.PlayerUpdate(p, s);
|
||||
curr.playerUpdate(p, s);
|
||||
assertEquals(p, curr.getCurrentPlayer());
|
||||
assertEquals(s, curr.getSlot());
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class GameTest {
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
order.add(current);
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, i));
|
||||
assertTrue(game.slotChoiceByIndex(current, i));
|
||||
|
||||
assertTrue(
|
||||
game.getSlotMap().values().stream()
|
||||
@@ -108,12 +108,12 @@ class GameTest {
|
||||
int index = firstNonEventIndexOrMinusOne(game.getLowerListTribeCards());
|
||||
|
||||
if (index != -1) {
|
||||
assertTrue(game.DrawLowerTribeCardByIndex(current, index));
|
||||
assertTrue(game.drawLowerTribeCardByIndex(current, index));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!game.getLowerListBuilding().isEmpty()
|
||||
&& game.DrawLowerBuildingCardByIndex(current, 0)) {
|
||||
&& game.drawLowerBuildingCardByIndex(current, 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -129,12 +129,12 @@ class GameTest {
|
||||
int index = firstNonEventIndexOrMinusOne(game.getUpperListTribeCards());
|
||||
|
||||
if (index != -1) {
|
||||
assertTrue(game.DrawUpperTribeCardByIndex(current, index));
|
||||
assertTrue(game.drawUpperTribeCardByIndex(current, index));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!game.getUpperListBuilding().isEmpty()
|
||||
&& game.DrawUpperBuildingCardByIndex(current, 0)) {
|
||||
&& game.drawUpperBuildingCardByIndex(current, 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -424,16 +424,16 @@ class GameTest {
|
||||
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
|
||||
assertFalse(game.SlotChoiceByIndex(current, -1));
|
||||
assertFalse(game.SlotChoiceByIndex(current, 999));
|
||||
assertFalse(game.slotChoiceByIndex(current, -1));
|
||||
assertFalse(game.slotChoiceByIndex(current, 999));
|
||||
|
||||
Player wrongPlayer = current.equals(p1) ? p2 : p1;
|
||||
assertFalse(game.SlotChoiceByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.slotChoiceByIndex(wrongPlayer, 0));
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, 0));
|
||||
assertTrue(game.slotChoiceByIndex(current, 0));
|
||||
|
||||
Player next = game.getCurrentState().getCurrentPlayer();
|
||||
assertFalse(game.SlotChoiceByIndex(next, 0));
|
||||
assertFalse(game.slotChoiceByIndex(next, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -453,7 +453,7 @@ class GameTest {
|
||||
Queue<Player> players = new LinkedList<>();
|
||||
for (int i = 0; i < game.getNPlayers(); i++) {
|
||||
players.add(game.getCurrentState().getCurrentPlayer());
|
||||
assertTrue(game.SlotChoiceByIndex(game.getCurrentState().getCurrentPlayer(), i));
|
||||
assertTrue(game.slotChoiceByIndex(game.getCurrentState().getCurrentPlayer(), i));
|
||||
}
|
||||
Player temp_player;
|
||||
|
||||
@@ -464,7 +464,7 @@ class GameTest {
|
||||
List<TribeCard> cards = game.getLowerListTribeCards();
|
||||
|
||||
index = firstNonEventIndex(cards);
|
||||
assertTrue(game.DrawLowerTribeCardByIndex(temp_player, index));
|
||||
assertTrue(game.drawLowerTribeCardByIndex(temp_player, index));
|
||||
|
||||
temp_player = players.poll();
|
||||
assertEquals(temp_player, game.getCurrentState().getCurrentPlayer());
|
||||
@@ -483,7 +483,7 @@ class GameTest {
|
||||
|
||||
TribeCard temp_card = cards.get(index);
|
||||
assertEquals(nCards - countCards, game.getUpperListTribeCards().size());
|
||||
assertTrue(game.DrawUpperTribeCardByIndex(temp_player, index));
|
||||
assertTrue(game.drawUpperTribeCardByIndex(temp_player, index));
|
||||
drawTribeTest(nCardsByType, temp_card, temp_player);
|
||||
countCards++;
|
||||
}
|
||||
@@ -491,7 +491,7 @@ class GameTest {
|
||||
|
||||
int eventIndex = firstEventIndexOrMinusOne(cards);
|
||||
if (eventIndex != -1) {
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(temp_player, eventIndex));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(temp_player, eventIndex));
|
||||
}
|
||||
|
||||
assertFalse(game.getUpperListBuilding().isEmpty());
|
||||
@@ -502,11 +502,11 @@ class GameTest {
|
||||
BuildingCard selectedBuilding = game.getUpperListBuilding().get(index);
|
||||
temp_player.addFood(selectedBuilding.getPrice());
|
||||
|
||||
assertTrue(game.DrawUpperBuildingCardByIndex(temp_player, index));
|
||||
assertTrue(game.drawUpperBuildingCardByIndex(temp_player, index));
|
||||
|
||||
int remainingTribeIndex = firstNonEventIndexOrMinusOne(game.getUpperListTribeCards());
|
||||
if (remainingTribeIndex != -1) {
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(temp_player, remainingTribeIndex));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(temp_player, remainingTribeIndex));
|
||||
}
|
||||
|
||||
Player thirdPlayer = players.poll();
|
||||
@@ -578,7 +578,7 @@ class GameTest {
|
||||
|
||||
int charactersBefore = current.getTotCharacters();
|
||||
|
||||
assertTrue(game.DrawUpperTribeCardByIndex(current, index));
|
||||
assertTrue(game.drawUpperTribeCardByIndex(current, index));
|
||||
|
||||
assertEquals(charactersBefore + 1, current.getTotCharacters());
|
||||
}
|
||||
@@ -616,7 +616,7 @@ class GameTest {
|
||||
int upperBuildingsBefore = game.getUpperListBuilding().size();
|
||||
int foodBefore = current.getFoodValue();
|
||||
|
||||
assertTrue(game.DrawUpperBuildingCardByIndex(current, 0));
|
||||
assertTrue(game.drawUpperBuildingCardByIndex(current, 0));
|
||||
|
||||
assertEquals(buildingsBefore + 1, current.getBuildingCards().size());
|
||||
assertEquals(upperBuildingsBefore - 1, game.getUpperListBuilding().size());
|
||||
@@ -711,7 +711,7 @@ class GameTest {
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
assertNotNull(current);
|
||||
|
||||
assertFalse(game.SlotChoiceByIndex(current, 0));
|
||||
assertFalse(game.slotChoiceByIndex(current, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -733,10 +733,10 @@ class GameTest {
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
assertNotNull(current);
|
||||
|
||||
assertFalse(game.DrawLowerTribeCardByIndex(current, 0));
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, 0));
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.DrawLowerBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawLowerTribeCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawLowerBuildingCardByIndex(current, 0));
|
||||
|
||||
/*
|
||||
* The totem choice phase and the slot choice phase are completed,
|
||||
@@ -749,30 +749,30 @@ class GameTest {
|
||||
|
||||
Player wrongPlayer = current.equals(p1) ? p2 : p1;
|
||||
|
||||
assertFalse(game.DrawLowerTribeCardByIndex(current, -1));
|
||||
assertFalse(game.DrawLowerTribeCardByIndex(current, 999));
|
||||
assertFalse(game.drawLowerTribeCardByIndex(current, -1));
|
||||
assertFalse(game.drawLowerTribeCardByIndex(current, 999));
|
||||
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, -1));
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, 999));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, -1));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, 999));
|
||||
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 999));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 999));
|
||||
|
||||
assertFalse(game.DrawLowerBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.DrawLowerBuildingCardByIndex(current, 999));
|
||||
assertFalse(game.drawLowerBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.drawLowerBuildingCardByIndex(current, 999));
|
||||
|
||||
int lowerIndex = firstNonEventIndexOrMinusOne(game.getLowerListTribeCards());
|
||||
if (lowerIndex != -1) {
|
||||
assertFalse(game.DrawLowerTribeCardByIndex(wrongPlayer, lowerIndex));
|
||||
assertFalse(game.drawLowerTribeCardByIndex(wrongPlayer, lowerIndex));
|
||||
}
|
||||
|
||||
int upperIndex = firstNonEventIndexOrMinusOne(game.getUpperListTribeCards());
|
||||
if (upperIndex != -1) {
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(wrongPlayer, upperIndex));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(wrongPlayer, upperIndex));
|
||||
}
|
||||
|
||||
if (!game.getUpperListBuilding().isEmpty()) {
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(wrongPlayer, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -785,8 +785,8 @@ class GameTest {
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
assertNotNull(current);
|
||||
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, 0));
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.skipTurn(current));
|
||||
}
|
||||
|
||||
@@ -806,15 +806,15 @@ class GameTest {
|
||||
|
||||
Player wrongPlayer = current.equals(players.get(0)) ? players.get(1) : players.get(0);
|
||||
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.skipTurn(wrongPlayer));
|
||||
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, -1));
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, 999));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, -1));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, 999));
|
||||
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 999));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, -1));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 999));
|
||||
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ class GameTest {
|
||||
Player current = game.getCurrentState().getCurrentPlayer();
|
||||
assertNotNull(current);
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, 0));
|
||||
assertTrue(game.slotChoiceByIndex(current, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -1009,7 +1009,7 @@ class GameTest {
|
||||
"There must be at least one upper building card to test that the player cannot buy it."
|
||||
);
|
||||
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -1044,7 +1044,7 @@ class GameTest {
|
||||
int foodBefore = current.getFoodValue();
|
||||
|
||||
assertTrue(
|
||||
game.DrawLowerBuildingCardByIndex(current, 0),
|
||||
game.drawLowerBuildingCardByIndex(current, 0),
|
||||
"DrawLowerBuildingCardByIndex should return true when lower building exists, player can draw lower, and player has food."
|
||||
);
|
||||
|
||||
@@ -1116,7 +1116,7 @@ class GameTest {
|
||||
int buildingsBefore = current.getBuildingCards().size();
|
||||
int upperBuildingsBefore = game.getUpperListBuilding().size();
|
||||
|
||||
assertFalse(game.DrawUpperBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawUpperBuildingCardByIndex(current, 0));
|
||||
|
||||
assertEquals(buildingsBefore, current.getBuildingCards().size());
|
||||
assertEquals(upperBuildingsBefore, game.getUpperListBuilding().size());
|
||||
@@ -1146,13 +1146,13 @@ class GameTest {
|
||||
addPlayers(game, 3, "slot_order_");
|
||||
|
||||
Player firstChooser = game.getCurrentState().getCurrentPlayer();
|
||||
assertTrue(game.SlotChoiceByIndex(firstChooser, 2));
|
||||
assertTrue(game.slotChoiceByIndex(firstChooser, 2));
|
||||
|
||||
Player secondChooser = game.getCurrentState().getCurrentPlayer();
|
||||
assertTrue(game.SlotChoiceByIndex(secondChooser, 0));
|
||||
assertTrue(game.slotChoiceByIndex(secondChooser, 0));
|
||||
|
||||
Player thirdChooser = game.getCurrentState().getCurrentPlayer();
|
||||
assertTrue(game.SlotChoiceByIndex(thirdChooser, 1));
|
||||
assertTrue(game.slotChoiceByIndex(thirdChooser, 1));
|
||||
|
||||
assertEquals(GameStages.RES_ACTIONS, game.getCurrentState().getGameStage());
|
||||
|
||||
@@ -1282,7 +1282,7 @@ class GameTest {
|
||||
int charactersBefore = current.getTotCharacters();
|
||||
int upperSizeBefore = game.getUpperListTribeCards().size();
|
||||
|
||||
assertFalse(game.DrawUpperTribeCardByIndex(current, eventIndex));
|
||||
assertFalse(game.drawUpperTribeCardByIndex(current, eventIndex));
|
||||
|
||||
assertEquals(GameStages.OPT_CARD_E, game.getCurrentState().getGameStage());
|
||||
assertEquals(current, game.getCurrentState().getCurrentPlayer());
|
||||
@@ -1384,7 +1384,7 @@ class GameTest {
|
||||
assertTrue(game.disconnectedPlayer(current));
|
||||
assertFalse(game.disconnectedPlayers.isEmpty());
|
||||
|
||||
game.ClearDisconnected();
|
||||
game.clearDisconnected();
|
||||
|
||||
assertTrue(game.disconnectedPlayers.isEmpty());
|
||||
}
|
||||
@@ -1427,7 +1427,7 @@ class GameTest {
|
||||
int buildingsBefore = current.getBuildingCards().size();
|
||||
int lowerBuildingsBefore = game.getLowerListBuilding().size();
|
||||
|
||||
assertFalse(game.DrawLowerBuildingCardByIndex(current, 0));
|
||||
assertFalse(game.drawLowerBuildingCardByIndex(current, 0));
|
||||
|
||||
assertEquals(buildingsBefore, current.getBuildingCards().size());
|
||||
assertEquals(lowerBuildingsBefore, game.getLowerListBuilding().size());
|
||||
@@ -1478,7 +1478,7 @@ class GameTest {
|
||||
|
||||
wrongPlayer.addFood(game.getLowerListBuilding().get(0).getPrice());
|
||||
|
||||
assertFalse(game.DrawLowerBuildingCardByIndex(wrongPlayer, 0));
|
||||
assertFalse(game.drawLowerBuildingCardByIndex(wrongPlayer, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1534,12 +1534,12 @@ class GameTest {
|
||||
|
||||
int foodBefore = current.getFoodValue();
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, 0));
|
||||
assertTrue(game.slotChoiceByIndex(current, 0));
|
||||
|
||||
for (int i = 1; i < game.getNPlayers(); i++) {
|
||||
Player temp = game.getCurrentState().getCurrentPlayer();
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(temp, i));
|
||||
assertTrue(game.slotChoiceByIndex(temp, i));
|
||||
|
||||
assertTrue(
|
||||
game.getSlotMap().values().stream()
|
||||
@@ -1552,12 +1552,12 @@ class GameTest {
|
||||
resolveAllMandatoryActions(game);
|
||||
foodBefore = current.getFoodValue();
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, 0));
|
||||
assertTrue(game.slotChoiceByIndex(current, 0));
|
||||
|
||||
for (int i = 1; i < game.getNPlayers(); i++) {
|
||||
Player temp = game.getCurrentState().getCurrentPlayer();
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(temp, i));
|
||||
assertTrue(game.slotChoiceByIndex(temp, i));
|
||||
|
||||
assertTrue(
|
||||
game.getSlotMap().values().stream()
|
||||
@@ -1580,7 +1580,7 @@ class GameTest {
|
||||
|
||||
int foodBefore = current.getFoodValue();
|
||||
|
||||
assertTrue(game.SlotChoiceByIndex(current, 1));
|
||||
assertTrue(game.slotChoiceByIndex(current, 1));
|
||||
|
||||
assertEquals(foodBefore, current.getFoodValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user