Test king bitboard move generation

Fixed its implementation by trimming overflow in the left and right directions.
This prevents moves that would wrap around the edge of the board.

Fixed an error in the logic of the sliding piece template.