I finally got the move generators working. There are two primary move generators. The first “generate_moves” is called when the side to move is not in check. It creates a list of pseudo moves (i.e. some may be illegal due to discovered check). The second routine, generate_evade_check creates a list of legal moves which get out of check. There were quite a few bugs to hunt down in creating these routines but they now seem OK (although I’m sure the perft analysis will highlight some more bugs).
So I’m now looking at making and unmaking moves. I’m trying to resist over-optimize at this stage. It’s difficult. It’s a balancing act between not over-optimizing and at the same time put in place all of the key elements which will enable Maverick to run at a reasonable pace. I’m hoping to finish the make / unmake routines on my trip to Tokyo this week. It’s a long trip via Dallas and the Dallas to Tokyo leg is 13 hours – I should have plenty of time.