movegen: refactor
This commit is contained in:
parent
9319dd3ac1
commit
c0ea24b967
|
@ -17,24 +17,15 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef MOVEGEN_H
|
||||
#define MOVEGEN_H
|
||||
#ifndef MOVEGEN_H_INCLUDED
|
||||
#define MOVEGEN_H_INCLUDED
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Position;
|
||||
|
||||
enum GenType
|
||||
{
|
||||
CAPTURES,
|
||||
LEGAL
|
||||
};
|
||||
|
||||
struct ExtMove
|
||||
{
|
||||
Move move;
|
||||
|
@ -81,7 +72,7 @@ public:
|
|||
// TODO: Move to private
|
||||
inline static Move moveTable[SQUARE_NB][MD_NB] = { {MOVE_NONE} };
|
||||
|
||||
inline static array<Move, FILE_NB * RANK_NB> movePriorityTable{
|
||||
inline static std::array<Move, FILE_NB * RANK_NB> movePriorityTable{
|
||||
(Move)8, (Move)9, (Move)10, (Move)11, (Move)12, (Move)13, (Move)14, (Move)15,
|
||||
(Move)16, (Move)17, (Move)18, (Move)19, (Move)20, (Move)21, (Move)22, (Move)23,
|
||||
(Move)24, (Move)25, (Move)26, (Move)27, (Move)28, (Move)29, (Move)30, (Move)31,
|
||||
|
@ -115,4 +106,4 @@ private:
|
|||
ExtMove moveList[MAX_MOVES], *last;
|
||||
};
|
||||
|
||||
#endif /* MOVEGEN_H */
|
||||
#endif // #ifndef MOVEGEN_H_INCLUDED
|
||||
|
|
Loading…
Reference in New Issue