|
@@ -9,6 +9,9 @@ import io.zipcoder.casino.player.Players;
|
9
|
9
|
import io.zipcoder.casino.utilities.Console;
|
10
|
10
|
import io.zipcoder.casino.utilities.Game;
|
11
|
11
|
|
|
12
|
+import java.lang.reflect.Array;
|
|
13
|
+import java.util.Arrays;
|
|
14
|
+
|
12
|
15
|
public class Casino {
|
13
|
16
|
private Game game;
|
14
|
17
|
Players players = Players.getInstance();
|
|
@@ -91,10 +94,10 @@ public class Casino {
|
91
|
94
|
|
92
|
95
|
public void bootPlayer() {
|
93
|
96
|
// If player balance is 0, player game over
|
94
|
|
- for(Player player : players.getPlayers()) {
|
95
|
|
- if(player.getChipBalance()<=0){
|
96
|
|
- console.println(player.getName() + ", YOU ARE BROKE. GTFO, PEASANT.");
|
97
|
|
- players.removePlayer(player);
|
|
97
|
+ for (int i = 0; i < players.getPlayers().size(); i++) {
|
|
98
|
+ if(players.getPlayers().get(i).getChipBalance()<=0){
|
|
99
|
+ console.println(players.getPlayers().get(i).getName() + ", YOU ARE BROKE. GTFO, PEASANT.");
|
|
100
|
+ players.removePlayer(players.getPlayers().get(i));
|
98
|
101
|
}
|
99
|
102
|
}
|
100
|
103
|
}
|