Adds and finishes pawn legality test; works on castling for king legality test.