Esempio n. 1
0
        /// <summary>
        /// Instantiates a new instance of the chess facade.
        /// </summary>
        public ChessFacade()
        {
            m_openingBook              = new OpeningBook();
            m_evaluator                = new BoardEvaluator();
            m_searchTree               = new SearchTree(m_evaluator);
            m_timeControl              = new TimeControl();
            m_engineManager            = new EngineManager(m_openingBook, m_searchTree, m_timeControl);
            m_engineManager.MoveFound += EngineMoveFound;

            m_engineConfiguration = new EngineConfiguration(true, true, new TimeSpan(0, 1, 0), 25);
            m_clockConfiguration  = new ClockConfiguration(ClockType.Conventional, 40, new TimeSpan(0, 25, 0), new TimeSpan(0, 15, 0), new TimeSpan(0, 0, 10));

            m_currentGame = new Game(null, m_clockConfiguration);
            m_currentGame.WhiteClockNotifier += WhiteClockEventHandler;
            m_currentGame.BlackClockNotifier += BlackClockEventHandler;
            m_boardCopy = new Board(m_currentGame.Board);

            m_previousGames   = new Stack <Game>();
            m_subsequentGames = new Stack <Game>();
        }
Esempio n. 2
0
        private ConfigurationForm(JointConfiguration currentConfig)
        {
            InitializeComponent();

              m_comboBoxClockType.Items.Add(ClockType.Conventional);
              m_comboBoxClockType.Items.Add(ClockType.Incremental);
              m_comboBoxClockType.Items.Add(ClockType.None);

              m_engineConfiguration = currentConfig.EngineConfiguration;
              m_clockConfiguration = currentConfig.ClockConfiguration;

              m_checkBoxEngine.Checked = m_engineConfiguration.EngineAutoPlay;
              m_checkBoxBook.Checked = m_engineConfiguration.UseBook;
              m_numericSearchTime.Value = (decimal)m_engineConfiguration.MaxSearchTime.TotalSeconds;
              m_numericSearchDepth.Value = m_engineConfiguration.MaxSearchDepth;

              m_comboBoxClockType.SelectedItem = m_clockConfiguration.ClockType;
              m_numericConventionalMoves.Value = m_clockConfiguration.ConventionalMoves;
              m_numericConventionalMinutes.Value = (decimal)m_clockConfiguration.ConventionalTime.TotalMinutes;

              m_numericIncrementStart.Value = (decimal)m_clockConfiguration.IncrementStartTime.TotalMinutes;
              m_numericIncrementPlus.Value = (decimal)m_clockConfiguration.IncrementPlusTime.TotalSeconds;
        }
Esempio n. 3
0
        /// <summary>
        /// Instantiates a new instance of the chess facade.
        /// </summary>
        public ChessFacade()
        {
            m_openingBook = new OpeningBook();
              m_evaluator = new BoardEvaluator();
              m_searchTree = new SearchTree(m_evaluator);
              m_timeControl = new TimeControl();
              m_engineManager = new EngineManager(m_openingBook, m_searchTree, m_timeControl);
              m_engineManager.MoveFound += EngineMoveFound;

              m_engineConfiguration = new EngineConfiguration(true, true, new TimeSpan(0, 1, 0), 25);
              m_clockConfiguration = new ClockConfiguration(ClockType.Conventional, 40, new TimeSpan(0, 25, 0), new TimeSpan(0, 15, 0), new TimeSpan(0, 0, 10));

              m_currentGame = new Game(null, m_clockConfiguration);
              m_currentGame.WhiteClockNotifier += WhiteClockEventHandler;
              m_currentGame.BlackClockNotifier += BlackClockEventHandler;
              m_boardCopy = new Board(m_currentGame.Board);

              m_previousGames = new Stack<Game>();
              m_subsequentGames = new Stack<Game>();
        }
Esempio n. 4
0
 public JointConfiguration(EngineConfiguration engineConfiguration, ClockConfiguration clockConfiguration)
 {
     m_engineConfiguration = engineConfiguration;
       m_clockConfiguration = clockConfiguration;
 }