public override void placeSelected(BoardVector pos) { switch (_currentChessVidMode) { case SHOW_PLACE: checkStaleMate(); if (showMovePoint(pos)) { _currentChessVidMode = SELECT_PLACE; } break; case SELECT_PLACE: if (selectMovePoint(pos)) { _actionPoint -= 2; checkNext(); } break; case STAY_HOME: if (stayHome(pos)) { _actionPoint--; checkNext(); } break; } }
public void passStayHome() { if (_currentChessVidMode == STAY_HOME && _actionPoint <= 1) { updateTurn(); _actionPoint = defaultActionPoint; _currentChessVidMode = SHOW_PLACE; } }
public override void cancelMove() { if (_currentChessVidMode == SHOW_PLACE || _currentChessVidMode == STAY_HOME) { return; } base.cancelMove(); BoardVisual.reset(); _currentChessVidMode = SHOW_PLACE; }
public void changeMode() { if (_actionPoint < defaultActionPoint) { return; } if (_currentChessVidMode == SHOW_PLACE) { _currentChessVidMode = STAY_HOME; } else if (_currentChessVidMode == STAY_HOME) { _currentChessVidMode = SHOW_PLACE; } }
void checkNext() { if (_actionPoint <= 0) { updateTurn(); _actionPoint = defaultActionPoint; _currentChessVidMode = SHOW_PLACE; return; } if (_actionPoint >= 2) { _currentChessVidMode = SHOW_PLACE; return; } _currentChessVidMode = STAY_HOME; }