예제 #1
0
        public void gotiAction()
        {
            if (TurnValue.Count > 1)
            {
                if (currentPosition == -1)
                {
                    if (userHasOne() && userHasSix())
                    {
                        LudoDelegate.showPanel(playerID, TurnValue, this.myColor, transform.position, this.index);
                    }
                    else
                    {
                        if (userHasSix())
                        {
                            LudoDelegate.selectNumber(6, this.playerID, this.index);
                        }
                        else if (userHasOne())
                        {
                            LudoDelegate.selectNumber(1, this.playerID, this.index);
                        }
                    }
                }
                else
                {
                    LudoDelegate.showPanel(playerID, TurnValue, this.myColor, transform.position, this.index);
                }
            }
            else if (TurnValue.Count == 1)
            {
                int number = int.Parse(TurnValue[0]);

                if (currentPosition == -1)
                {
                    if (number == 6 || number == 1)
                    {
                        LudoDelegate.selectNumber(number, this.playerID, this.index);
                    }
                }
                if (currentPosition != -1)
                {
                    LudoDelegate.selectNumber(number, this.playerID, this.index);
                }
            }
        }