示例#1
0
        public ClickGame(ClickGameConfiguration config, GameCreationPayload payload)
        {
            _config = config;
            IReadOnlyCollection <IPlayer> players = payload.PlayerToRole.Keys.ToArray();

            _allPlayers = new MulticastGroup(players);
        }
示例#2
0
 public IGame Create(IGameConfiguration config, GameCreationPayload payload)
 {
     if (config is not ClickGameConfiguration correctConfig)
     {
         throw new ArgumentException("Provided invalid configuration");
     }
     return(new ClickGame(correctConfig, payload));
 }
 public string?ValidateRolesWithConfig(IGameConfiguration config, GameCreationPayload payload)
 {
     return(null);
 }