Fix legality check of king move