Example #1
0
        private void TrySelectPosition(TallonRollHelper tallonRollHelper, int direction)
        {
            UI.HideNextButton();

            Selection.ThisShip.SetPosition(tallonRollHelper.GetPosition(direction));

            DecisionSubPhase.ResetInput();

            if (tallonRollHelper.IsPositionAllowed[direction])
            {
                UI.ShowNextButton();
            }
            else
            {
                Messages.ShowError("This position is not available");
            }

            if (Selection.ThisShip.Owner is Players.GenericAiPlayer)
            {
                UI.CallClickNextPhase();
            }
        }