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(); } }
public void AddSpace(CircleSpace circleSpace) => spaces.Add(circleSpace);