Performance and correctness testing utility (Perft) for move generation and game-state transitions.
Recursively counts the number of leaf nodes at a given depth. If state.dicePool is empty, MoveGenerator.generateAllMoves is used (standard chess pseudo-legal moves); otherwise, MoveGenerator.generateMoves generates moves constrained by the current dice roll.