Пример #1
0
        public InteractiveConsole()
        {
            _commands              = new Dictionary <string, ICommand>();
            _commands["help"]      = new HelpCommand(this, _commands);
            _commands["magic"]     = new MagicCommand(this);
            _commands["aperft"]    = new AdvancedPerftCommand(this);
            _commands["dperft"]    = new DividedPerftCommand(this);
            _commands["perft"]     = new SimplePerftCommand(this);
            _commands["benchmark"] = new BenchmarkCommand(this);
            _commands["verify"]    = new VerifyCommand(this);
            _commands["evaluate"]  = new EvaluateCommand(this);
            _commands["tuner"]     = new TunerCommand(this);
            _commands["uci"]       = new UciCommand(this);
            _commands["quit"]      = new QuitCommand(this);

            _symbols = new List <string> {
                "%", "s", "ns", "MN/s", "ML/s"
            };

            _keywordColor = ConsoleColor.Cyan;
            _moveColor    = ConsoleColor.Red;
            _numberColor  = ConsoleColor.Yellow;
            _symbolColor  = ConsoleColor.Yellow;

            CultureInfo.CurrentCulture = new CultureInfo("en-US", false);
        }
Пример #2
0
    /// <summary>
    /// Makes this Builder a BenchmarkCommand-Builder.
    /// </summary>
    /// <returns><see cref="BenchmarkCommandBuilder"/>.</returns>
    public BenchmarkCommandBuilder InBenchmarkMode()
    {
        var command = new BenchmarkCommand();

        Command = command;
        return(new BenchmarkCommandBuilder(ref command));
    }
    public void BenchmarkCommandBuilder_sets_property_on_command <T>(
        Action <BenchmarkCommandBuilder, T> setter,
        Func <BenchmarkCommand, T> getter,
        T expected)
    {
        var command = new BenchmarkCommand();
        var builder = new BenchmarkCommandBuilder(ref command);

        setter(builder, expected);

        var actual = getter(command);

        actual.ShouldBe(expected);
    }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BenchmarkCommandBuilder"/> class.
 /// </summary>
 /// <param name="command">The command.</param>
 internal BenchmarkCommandBuilder(ref BenchmarkCommand command)
 {
     this.command = command;
 }
Пример #5
0
 public ToolsCommand(OptionsCommand optionsCommand, LanguageCommand languageCommand, FullScreenCommand fullScreenCommand, BenchmarkCommand benchmarkCommand, LogsCommand logsCommand) : base(MenuStrings.toolsToolStripMenuItem_Text)
 {
     ChildrenCommands = new List <IToolbarCommand>
     {
         optionsCommand,
         languageCommand,
         fullScreenCommand,
         null,
         benchmarkCommand,
         null,
         logsCommand
     };
 }