/// <summary> /// State exit event. Hides view elements. /// </summary> public override void Exit() { ui.Hide(); turn.Exit(); turn = null; HideInGameMenu(); DetachMapEventHandlers(); DetachUiEventHandlers(); base.Exit(); }
public void NextTurn() { currentTurn.Exit(ruleManager); view.ShowCurrentBoard(ruleManager.Board); var next = currentTurn; currentTurn = nextTurn; nextTurn = next; ruleManager.FindSquaresToPut(currentTurn); currentTurn.Enter(ruleManager); view.ShowInputMessage(currentTurn); currentTurn.Execute(ruleManager); }
private void Enter(TurnState next) { current.Exit(); current = next; next.Enter(); }