Updated 'ChoosePieceState' class.
Updated the 'ChoosePieceState' to work correctly as a state automaton.
This commit is contained in:
@@ -49,12 +49,57 @@ public void exit() {
|
|||||||
/**
|
/**
|
||||||
* This method will be used to return currentState attribute of ChoosePieceState class.
|
* 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() {
|
public ChoosePieceAutomatonState getCurrentState() {
|
||||||
return this.currentState;
|
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.
|
* 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.
|
* In Addition, the currentState will be exited, changed and entered.
|
||||||
|
|||||||
Reference in New Issue
Block a user