March 2018
Beginner to intermediate
422 pages
10h 33m
English
Let's define a method to check whether the king is in check from the opponent, as follows:
def is_king_under_check(self, color): position_of_king = self.get_alphanumeric_position_of_king(color) opponent = 'black' if color =='white' else 'white' return position_of_king in self.get_all_available_moves(opponent)
The following is a description of the preceding code:
This accomplishes the ...
Read now
Unlock full access