/** prints a message to the console when there is a draw */ public void printDrawMessage() { ArrayList<Player> drawedPlayers = playerlist.returnDrawedPlayers(); System.out.println("\n" + "There is a draw between the following players: "); for (Player currentP : playerlist.returnDrawedPlayers()) { System.out.println(currentP.getName()); } System.out.println( "with each of them having a score of " + drawedPlayers.get(0).getScore() + "!"); }
/** * checks if there is a draw between the players or not * * @return True if there is a draw. Else false. */ public boolean draw() { return playerlist.returnDrawedPlayers().size() > 1; }