Esempio n. 1
0
 private IEnumerable <Player> BuildPlayers(GameScope gameScope, GameSpec spec)
 {
     return(spec.Players
            .Select(playerSpec => gameScope.PlayerBuilder.ForSpec(playerSpec))
            .Select(dummy => (Player)dummy).ToList());
 }
Esempio n. 2
0
 public Game(GameScope gameScope, IEnumerable <Player> players)
     : this(gameScope.EventAggregator, gameScope.SupplyBuilder, players, gameScope.EndGameConditions, gameScope.Container)
 {
 }
Esempio n. 3
0
 public Game Initialize(GameSpec spec, GameScope scope)
 {
     scope.SupplyBuilder.WithGameSpec(spec);
     return(new Game(scope, BuildPlayers(scope, spec)));
 }