Generate moves and boards as needed to speed up negamax with alpha-beta pruning. Fixed a bug in canCaptureKing that was not checking if the opponents king can capture the king.