@@ -8,6 +8,7 @@ import it.polimi.ingsw.gc14.Model.GamePackage.GameStages;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.Timeout;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -807,22 +808,26 @@ class GameTest {
|
||||
assertFalse(game.PickOptionalBuildingCard(current, 0));
|
||||
}
|
||||
@Test
|
||||
void toStringModel()
|
||||
{
|
||||
Game game=new Game(3);
|
||||
void toStringModel() throws IOException, InterruptedException {
|
||||
Game game=new Game(5);
|
||||
Player p1=new Player("p1");
|
||||
Player p2=new Player("p2");
|
||||
Player p3=new Player("p3");
|
||||
Player p4=new Player("p4");
|
||||
Player p5=new Player("p5");
|
||||
|
||||
assertTrue(game.addPlayer(p1));
|
||||
assertTrue(game.addPlayer(p2));
|
||||
assertTrue(game.addPlayer(p3));
|
||||
assertTrue(game.addPlayer(p4));
|
||||
assertTrue(game.addPlayer(p5));
|
||||
|
||||
Queue<Player>players=new LinkedList<>();
|
||||
for(int i=0;i<3;i++) {
|
||||
players.add( game.getCurrentState().getCurrentPlayer());
|
||||
assertTrue(game.SlotChoiceByIndex(game.getCurrentState().getCurrentPlayer(), i));
|
||||
}
|
||||
System.out.println(game);
|
||||
|
||||
System.out.println(game.toString());
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ class PlayerTest {
|
||||
p.buildingCards.add(new Building1(2, 5, 5, CharacterType.INVENTOR));
|
||||
p.buildingCards.add(new Building1(2, 5, 5, CharacterType.SHAMAN));
|
||||
p.buildingCards.add(new Building11(1, 5, 7, CharacterType.ARTIST , 3));
|
||||
//System.out.println(p.toString());
|
||||
System.out.println(p.toString());
|
||||
assertEquals(""+
|
||||
"╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗\n" +
|
||||
"║ test_usr ║\n" +
|
||||
|
||||
Reference in New Issue
Block a user