|
|
|
|
@ -14,7 +14,7 @@ public class Players extends ArrayList<Player> {
|
|
|
|
|
Out.println(String.format("%s: %d - %s", output, card.number, card.suit));
|
|
|
|
|
}
|
|
|
|
|
pot.addAll(draws);
|
|
|
|
|
givePotToWinner();
|
|
|
|
|
givePotOnWin();
|
|
|
|
|
}
|
|
|
|
|
Out.println(String.format("Player %s wins the game!", get(0).name));
|
|
|
|
|
}
|
|
|
|
|
@ -28,7 +28,7 @@ public class Players extends ArrayList<Player> {
|
|
|
|
|
return size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void givePotToWinner() {
|
|
|
|
|
private void givePotOnWin() {
|
|
|
|
|
Card max = draws.getMax();
|
|
|
|
|
if (draws.occurrences(max.number) == 1) {
|
|
|
|
|
int maxIndex = draws.indexOf(max);
|
|
|
|
|
|