Refactored testing if a move would put the player in check to its own function

This allows pieces to override this specifically for unusual moves like EnPassant