예제 #1
0
        public void HandleSpace(CircleSpace circleSpace)
        {
            if (RequestLetter)
            {
                throw new InvalidOperationException();
            }
            switch (circleSpace.Type)
            {
            case CircleSpace.SpaceType.Dollar:
                RequestLetter      = true;
                LetterDollarAmount = circleSpace.DollarAmount;
                break;

            case CircleSpace.SpaceType.LoseTurn:
                NextPlayer();
                break;

            case CircleSpace.SpaceType.Bankrupt:
                CurrentPlayer.RemoveAllMoney();
                NextPlayer();
                break;

            default:
                throw new NotSupportedException();
            }
        }
예제 #2
0
 public void AddSpace(CircleSpace circleSpace) => spaces.Add(circleSpace);