fixed and added some tests
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SelectPieceState extends ChoosePieceAutomatonState {
|
||||
/**
|
||||
@@ -20,8 +21,8 @@ public class SelectPieceState extends ChoosePieceAutomatonState {
|
||||
private static final System.Logger LOGGER = System.getLogger(SelectPieceState.class.getName());
|
||||
|
||||
private ArrayList<Piece> moveablePieces = new ArrayList<>();
|
||||
private final ArrayList<Boolean> isHomeMove = new ArrayList<>();
|
||||
private final ArrayList<Integer> targetIndex = new ArrayList<>();
|
||||
private ArrayList<Boolean> isHomeMove = new ArrayList<>();
|
||||
private ArrayList<Integer> targetIndex = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Constructs a server state of the specified game logic.
|
||||
@@ -178,4 +179,22 @@ public void exit() {
|
||||
public ArrayList<Piece> getMoveablePieces() {
|
||||
return moveablePieces;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method is used to set the isHomeMoveIndex
|
||||
*
|
||||
* @param list to be set
|
||||
*/
|
||||
public void setIsHomeMove(ArrayList<Boolean> list){
|
||||
this.isHomeMove=list;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method is used to set the targetIndex
|
||||
*
|
||||
* @param list to be set
|
||||
*/
|
||||
public void setTargetIndex(ArrayList<Integer> list){
|
||||
this.targetIndex=list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user