changed var name
This commit is contained in:
@@ -29,6 +29,8 @@ public SwapState(ClientState parent, ClientGameLogic logic) {
|
|||||||
this.parent = (PowerCardState) parent;
|
this.parent = (PowerCardState) parent;
|
||||||
possibleOwnPieces = new ArrayList<>();
|
possibleOwnPieces = new ArrayList<>();
|
||||||
possibleEnemyPieces = new ArrayList<>();
|
possibleEnemyPieces = new ArrayList<>();
|
||||||
|
selectedOwnPiece = null;
|
||||||
|
selectedEnemyPiece = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -37,15 +39,15 @@ public void enter() {
|
|||||||
ArrayList<UUID> ownPieces = new ArrayList<>(possibleOwnPieces.stream().map(Piece::getUuid).toList());
|
ArrayList<UUID> ownPieces = new ArrayList<>(possibleOwnPieces.stream().map(Piece::getUuid).toList());
|
||||||
ArrayList<UUID> enemyPieces = new ArrayList<>(possibleEnemyPieces.stream().map(Piece::getUuid).toList());
|
ArrayList<UUID> enemyPieces = new ArrayList<>(possibleEnemyPieces.stream().map(Piece::getUuid).toList());
|
||||||
logic.addNotification(new SelectableSwapNotification(ownPieces, enemyPieces));
|
logic.addNotification(new SelectableSwapNotification(ownPieces, enemyPieces));
|
||||||
possibleOwnPieces = null;
|
selectedOwnPiece = null;
|
||||||
possibleEnemyPieces = null;
|
selectedEnemyPiece = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exit() {
|
public void exit() {
|
||||||
LOGGER.log(System.Logger.Level.INFO, "Exiting SwapState");
|
LOGGER.log(System.Logger.Level.INFO, "Exiting SwapState");
|
||||||
possibleOwnPieces = null;
|
possibleOwnPieces.clear();
|
||||||
possibleEnemyPieces = null;
|
possibleEnemyPieces.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPossibleOwnPieces(ArrayList<Piece> possibleOwnPieces) {
|
public void setPossibleOwnPieces(ArrayList<Piece> possibleOwnPieces) {
|
||||||
|
|||||||
Reference in New Issue
Block a user