Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.3 kB
4
Indexable
 DoctorLecter doctorLecter = new DoctorLecter("doctorlecter", 1);
        Doctor doctor = new Doctor("doctor", 2);
        Detective detective = new Detective("detective", 3);
        OrdinaryMafia ordinaryMafia = new OrdinaryMafia("ordinaryMafia", 67);
        Sniper sniper = new Sniper("sniper", 34);

        List<Player> players = new ArrayList<>();

        players.add(doctorLecter); // mafia
        players.add(doctor); // citizen
        players.add(detective); // citizen
        players.add(ordinaryMafia); // mafia
        players.add(sniper); // citizen

        GameState gameState = new GameState(players);


        gameState.nextNight();
//        doctorLecter.action(detective);
//        sniper.action(detective);
//        ordinaryMafia.action(doctor);


        gameState.nextDay(); // round1
        System.out.println(gameState.isDay()); // true
        System.out.println(gameState.allPlayers());
        System.out.println(gameState.getRound());
        System.out.println(gameState.getAlivePlayers());
        System.out.println(gameState.getDeadPlayersInLastRound());
        System.out.println(gameState.getSilentPlayerInLastRound());
        System.out.println(gameState.getWinners());
        System.out.println(gameState.getExecutedPlayer());


        gameState.nextNight();
        System.out.println(gameState.isDay()); // false
        System.out.println(gameState.getRound()); // 1
        System.out.println(gameState.getWinners());
        System.out.println(gameState.getAlivePlayers());
        System.out.println(gameState.getDeadPlayersInLastRound());
        System.out.println(gameState.getSilentPlayerInLastRound());
        System.out.println(gameState.getWinners());
        System.out.println(gameState.getExecutedPlayer());


        gameState.nextDay(); // round2
        System.out.println(gameState.isDay()); // true
        System.out.println(gameState.getRound()); // 2
        System.out.println(gameState.getWinners());


        gameState.nextNight();
        System.out.println(gameState.isDay()); // false
        System.out.println(gameState.getWinners()); //


        gameState.nextDay(); // round3
        System.out.println(gameState.isDay()); // true
        System.out.println(gameState.getRound()); // 3
        System.out.println(gameState.getWinners()); //