Example #1
0
        public static GameConfiguration GetConfigurationFromRoomProperties(Room room)
        {
            byte roundsToWin = (byte)room.CustomProperties[RoundsToWinIdentifier];
            byte playerCount = (byte)room.CustomProperties[PlayerCountIdentifier];
            GameConfigurationFlags configurationFlags = (GameConfigurationFlags)room.CustomProperties[ConfigurationFlagsIdentifier];

            return(new GameConfiguration(playerCount, roundsToWin, configurationFlags));
        }
Example #2
0
 public GameConfiguration(byte playerCount, byte roundsToWin, GameConfigurationFlags configurationFlags)
 {
     PlayerCount         = playerCount;
     RoundsToWin         = roundsToWin;
     _configurationFlags = configurationFlags;
 }