Beispiel #1
0
        public SetGameTokenResult SetGameToken(GameToken gameToken)
        {
            if (GameToken != null)
            {
                return(SetGameTokenResult.Occupied);
            }

            if (!_supportedGameTokens.Contains(gameToken.GetType()))
            {
                return(SetGameTokenResult.Unsupported);
            }

            GameToken = gameToken;

            return(SetGameTokenResult.Success);
        }
Beispiel #2
0
 public override bool CanPlaceToken(GameToken gameToken) =>
 GameToken == null &&
 _supportedGameTokens.Contains(gameToken.GetType());