tried to king in check logic