Exemplo 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());
 }
Exemplo n.º 2
0
 public Game(GameScope gameScope, IEnumerable <Player> players)
     : this(gameScope.EventAggregator, gameScope.SupplyBuilder, players, gameScope.EndGameConditions, gameScope.Container)
 {
 }
Exemplo n.º 3
0
 public Game Initialize(GameSpec spec, GameScope scope)
 {
     scope.SupplyBuilder.WithGameSpec(spec);
     return(new Game(scope, BuildPlayers(scope, spec)));
 }