Example #1
0
        /// <summary>
        ///     Builds and returns the game specified by this builder.
        /// </summary>
        /// <returns>A new game</returns>
        public Game Build()
        {
            DiaballikUtil.Assert(CanBuild, ErrorMessage);

            var players = (PlayerBuilder1, PlayerBuilder2).Map(x => x.Build());
            var specs   = InitStrategy.InitPositions(BoardSize)
                          .Zip(players, (spec, player) => new FullPlayerBoardSpec(player, spec));

            return(Game.Init(BoardSize, specs));
        }
Example #2
0
 public static Grid Init(InitStrategy strat, int Size)
 {
     return(strat.Init(Size));
 }
Example #3
0
 public EwmaComputer(Time halfLife, InitStrategy initStrat)
 {
     this.halfLife = halfLife;
     this.minDeltaT = halfLife / 100UL;
     this.initStrat = initStrat;
 }