|
|
@ -7,7 +7,7 @@ import java.util.ArrayList; |
|
|
|
public class PlayerService { |
|
|
|
|
|
|
|
private boolean currentTurn = true; // true --> real player, false --> Bot |
|
|
|
private int totalTurns = 0; |
|
|
|
|
|
|
|
private final ArrayList<Player> playerList = new ArrayList<>(); |
|
|
|
|
|
|
|
public ArrayList<Player> getPlayerList() { |
|
|
@ -15,17 +15,13 @@ public class PlayerService { |
|
|
|
} |
|
|
|
public void addPlayerToList(Player player) { |
|
|
|
playerList.add(player); |
|
|
|
totalTurns++; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void nextTurn() |
|
|
|
{ |
|
|
|
currentTurn = !currentTurn; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean getCurrentTurn() { |
|
|
|
return currentTurn; |
|
|
|
} |
|
|
@ -35,12 +31,4 @@ public class PlayerService { |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
public int getTotalTurns() { |
|
|
|
return totalTurns; |
|
|
|
} |
|
|
|
|
|
|
|
public PlayerService setTotalTurns(int totalTurns) { |
|
|
|
this.totalTurns = totalTurns; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |