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()); }
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()); }
public abstract GamePlayer Build(StoneColor color, TimeControlSettingsViewModel timeSettings, PlayerSettingsViewModel settings);