Added nce_check subroutine to detect when a player is in check