Updated 'LobbyState' class.
Updated the 'LobbyState' class by setting the first waiting piece on the start node.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package pp.mdga.server.automaton;
|
||||
|
||||
import pp.mdga.game.Color;
|
||||
import pp.mdga.game.Piece;
|
||||
import pp.mdga.game.PieceState;
|
||||
import pp.mdga.game.Player;
|
||||
import pp.mdga.message.client.*;
|
||||
import pp.mdga.message.server.*;
|
||||
@@ -50,6 +52,10 @@ public void initializeGame() {
|
||||
for (var player : this.logic.getGame().getPlayers().values()) {
|
||||
player.initialize();
|
||||
player.addHandCard(this.logic.getGame().draw());
|
||||
Piece piece = player.getWaitingArea()[0];
|
||||
player.getWaitingArea()[0] = null;
|
||||
piece.setState(PieceState.ACTIVE);
|
||||
this.logic.getGame().getBoard().getInfield()[player.getStartNodeIndex()].setOccupant(piece);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user