minor fixes to initialize method in noPiece state of server
This commit is contained in:
@@ -31,10 +31,12 @@ private void initialize(){
|
|||||||
if (activePlayer.hasPieceInWaitingArea()){
|
if (activePlayer.hasPieceInWaitingArea()){
|
||||||
if (!logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].isOccupied(activePlayer.getColor())){
|
if (!logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].isOccupied(activePlayer.getColor())){
|
||||||
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getWaitingPieceState());
|
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getWaitingPieceState());
|
||||||
|
} else {
|
||||||
|
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getNoTurnState());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getNoTurnState());
|
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getNoTurnState());
|
||||||
}
|
}
|
||||||
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getNoTurnState());
|
|
||||||
}
|
}
|
||||||
} else if (activePlayer.hasPieceInWaitingArea()) {
|
} else if (activePlayer.hasPieceInWaitingArea()) {
|
||||||
if (!logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].isOccupied(activePlayer.getColor())){
|
if (!logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].isOccupied(activePlayer.getColor())){
|
||||||
@@ -45,6 +47,8 @@ private void initialize(){
|
|||||||
}
|
}
|
||||||
} else if (canMove(logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].getOccupant())){
|
} else if (canMove(logic.getGame().getBoard().getInfield()[activePlayer.getStartNodeIndex()].getOccupant())){
|
||||||
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getStartPieceState());
|
this.choosePieceAutomaton.setCurrentState(this.choosePieceAutomaton.getStartPieceState());
|
||||||
|
} else {
|
||||||
|
checkSelectPiece(activePlayer);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
checkSelectPiece(activePlayer);
|
checkSelectPiece(activePlayer);
|
||||||
|
|||||||
Reference in New Issue
Block a user