Exemplo n.º 1
0
        public void MoveGoose()
        {
            int amountOfSpaces;

            Logics.RollDice(out amountOfSpaces);
            if (PlayNextTrun == false)
            {
                if (Wait == false)
                {
                    PlayNextTrun = true;
                }
            }
            else
            {
                int tempField = Field;

                if (tempField + amountOfSpaces > 63)
                {
                    this.Field = 63 - (amountOfSpaces - (63 - tempField));
                }
                else
                {
                    this.Field = Field + amountOfSpaces;
                }
                Tuple <bool, SpecialField> SpecialField = Logics.IsSpecialField(Field);
                if (SpecialField.Item1 == true)
                {
                    ActionOfField(SpecialField.Item2);
                }
            }
        }
Exemplo n.º 2
0
        private void specialFieldAction(int playerPosition)
        {
            Tuple <bool, SpecialField> tuple = gameLogics.IsSpecialField(currentPosition);

            if (tuple.Item1)
            {
                SpecialField field = tuple.Item2;
                switch (field.Command)
                {
                case SpecialField.CommandOptions.GoTO:
                    //moveGoosePosition(playerColour, currentPosition, field.FieldNumber);
                    switch (playerPosition)
                    {
                    case 1:
                        currentPositionPlayer1 = field.GoToFIeld;
                        break;

                    case 2:
                        currentPositionPlayer2 = field.GoToFIeld;
                        break;

                    case 3:
                        currentPositionPlayer3 = field.GoToFIeld;
                        break;

                    case 4:
                        currentPositionPlayer4 = field.GoToFIeld;
                        break;
                    }
                    break;

                case SpecialField.CommandOptions.SkipTurn:
                    PlayNextTrun = false;
                    break;

                case SpecialField.CommandOptions.Wait:
                    Wait = true;
                    break;

                case SpecialField.CommandOptions.End:
                    break;
                }
            }
        }