Exemplo n.º 1
0
 //*********************************************************     
 //
 /// <summary>
 /// Class constructor. Build a board.
 /// </summary>
 //  
 //*********************************************************     
 public ChessBoard(SearchEngine.ITrace trace) : this(null, null) {
     m_trace                 = trace;
     m_searchEngineAlphaBeta = new SearchEngineAlphaBeta(trace, m_rnd, m_rndRep);
     m_searchEngineMinMax    = new SearchEngineMinMax(trace, m_rnd, m_rndRep);
 }
Exemplo n.º 2
0
 //*********************************************************     
 //
 /// <summary>
 /// Class constructor. Build a board.
 /// </summary>
 //  
 //*********************************************************     
 private ChessBoard(SearchEngineAlphaBeta searchEngineAlphaBeta, SearchEngineMinMax searchEngineMinMax) {
     m_pBoard                    = new PieceE[64];
     m_book                      = new Book();
     m_piPiecesCount             = new int[16];
     m_rnd                       = new Random((int)DateTime.Now.Ticks);
     m_rndRep                    = new Random(0);
     m_stackPossibleEnPassantAt  = new Stack<int>(256);
     m_trace                     = null;
     m_moveHistory               = new MoveHistory();
     m_bDesignMode               = false;
     m_moveStack                 = new MovePosStack();
     m_searchEngineAlphaBeta     = searchEngineAlphaBeta;
     m_searchEngineMinMax        = searchEngineMinMax;
     ResetBoard();
 }