Updated 'ChoosePieceState' class.

Updated the 'ChoosePieceState' to work correctly as a state automaton.
This commit is contained in:
Daniel Grigencha
2024-12-01 23:28:50 +01:00
parent 23aa2db714
commit 02d7ef1dd8

View File

@@ -49,12 +49,57 @@ public void exit() {
/**
* This method will be used to return currentState attribute of ChoosePieceState class.
*
* @return currentState as a
* @return currentState as a ChoosePieceAutomatonState object.
*/
public ChoosePieceAutomatonState getCurrentState() {
return this.currentState;
}
/**
* This method will be used to return noPieceState attribute of ChoosePieceState class.
*
* @return noPieceState as a NoOPieceState object.
*/
public NoPieceState getNoPieceState() {
return this.noPieceState;
}
/**
* This method will be used to return noTurnState attribute of ChoosePieceState class.
*
* @return noTurnState as a NoTurnState object.
*/
public NoTurnState getNoTurnState() {
return this.noTurnState;
}
/**
* This method will be used to return waitingPieceState attribute of ChoosePieceState class.
*
* @return waitingPieceState as a WaitingPieceState object.
*/
public WaitingPieceState getWaitingPieceState() {
return this.waitingPieceState;
}
/**
* This method will be used to return startPieceState attribute of ChoosePieceState class.
*
* @return startPieceState as a StartPieceState object.
*/
public StartPieceState getStartPieceState() {
return this.startPieceState;
}
/**
* This method will be used to return selectPieceState attribute of ChoosePieceState class.
*
* @return selectPieceState as a SelectPieceState object.
*/
public SelectPieceState getSelectPieceState() {
return this.selectPieceState;
}
/**
* This method will be used to set currentState attribute of ChoosePieceState class to the given state parameter.
* In Addition, the currentState will be exited, changed and entered.