/// <summary> /// Construct board based on FEN. /// </summary> public Board(string Fen) { pieces = new int[64]; //Every square for every piece PvArray = new int[Defs.MaxDepth]; History = new HMove[2056]; for (int i = 0; i < History.Length; i++) { History[i] = new HMove(); } InitPVTable(); SearchHistory = new int[14][]; SearchKillers = new int[2][]; for (int i = 0; i < 14; i++) { SearchHistory[i] = new int[64]; } SearchKillers[0] = new int[Defs.MaxDepth]; SearchKillers[1] = new int[Defs.MaxDepth]; //Init board from FEN this.BoardFromFen(Fen); //Get hash key Position = Zobrist.GetHashPosition(this); UpdateOccupancy(); }