private void NewGame(GameMode gameMode) { this.gameMode = gameMode; GameInfo.Instance.NewGame(); lastMove = null; lastMoveHint.UnFocus(); moveState = MoveState.Idle; ClearEffect(); hint.ClearHints(); if (gameMode == GameMode.Agent) { InitAgent(); } board.NewGame(); storage.NewGame(); switchModeUI.NewGame(); state = MainState.Ready; turn = Unit.OwnerEnum.Black; turnNum = 0; if (resultUI != null) { resultUI.gameObject.SetActive(false); } storage.IsEndTurnValid = false; storage.IsCancelValid = false; _actionLogs.Clear(); _actionsCurrentTurn.Clear(); statusUI.ShowAction(); }