Example #1
0
 public override GamePlayer Build(StoneColor color, TimeControlSettingsViewModel timeSettings, PlayerSettingsViewModel settings)
 {
     return(new HumanPlayerBuilder(color)
            .Name(color == StoneColor.Black ? _localizer.Black : _localizer.White)
            .Rank("NR")
            .Clock(timeSettings.Build())
            .Build());
 }
Example #2
0
        public override GamePlayer Build(StoneColor color, TimeControlSettingsViewModel timeSettings, PlayerSettingsViewModel settings)
        {
            IAIProgram newInstance = (IAIProgram)Activator.CreateInstance(_ai.GetType());

            if (settings.IsFuego)
            {
                Fuego fuego = (Fuego)newInstance;
                fuego.Ponder      = settings.FuegoPonder;
                fuego.AllowResign = settings.FuegoResign;
                fuego.MaxGames    = settings.FuegoMaxGames;
            }
            else if (settings.IsFluffy)
            {
                Fluffy fluffy = (Fluffy)newInstance;
                fluffy.TreeDepth = settings.FluffyTreeDepth;
            }
            return(new AiPlayerBuilder(color)
                   .Name(this._aiLocalizedMetadata.Name + "(" + color.ToIgsCharacterString() + ")")
                   .Rank("NR")
                   .Clock(timeSettings.Build())
                   .AiProgram(newInstance)
                   .Build());
        }