mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-08-05 23:55:30 +02:00
lobby uebergibt farbe und startgeld
This commit is contained in:
@@ -51,7 +51,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
||||
/** The current state of the client game logic. */
|
||||
private ClientState state = new LobbyState(this);
|
||||
|
||||
private PlayerHandler playerHandler;
|
||||
private static PlayerHandler playerHandler;
|
||||
|
||||
/**
|
||||
* Constructs a ClientGameLogic with the specified sender object.
|
||||
@@ -83,7 +83,7 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
||||
state.entry();
|
||||
}
|
||||
|
||||
public PlayerHandler getPlayerHandler() {
|
||||
public static PlayerHandler getPlayerHandler() {
|
||||
return playerHandler;
|
||||
}
|
||||
|
||||
|
@@ -157,7 +157,7 @@ public class PlayerHandler {
|
||||
* @param id the id to be searched for
|
||||
* @return the player with the required id
|
||||
*/
|
||||
Player getPlayerById(int id) {
|
||||
public Player getPlayerById(int id) {
|
||||
for (Player player : players) {
|
||||
if (player.getId() == id) return player;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class PlayerHandler {
|
||||
players.get(0).setActive();
|
||||
}
|
||||
|
||||
void setStartBalance(int amount) {
|
||||
public void setStartBalance(int amount) {
|
||||
for (Player player : players) {
|
||||
player.setAccountBalance(amount);
|
||||
}
|
||||
|
Reference in New Issue
Block a user