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)); }
public GameConfiguration(byte playerCount, byte roundsToWin, GameConfigurationFlags configurationFlags) { PlayerCount = playerCount; RoundsToWin = roundsToWin; _configurationFlags = configurationFlags; }