engine.py
def castlings(self):
        """Return a list of Move-objects corresponding to all possible castlings
        in this position. It is assumed that no moves have been made to the game state
        for while using this method."""
        move_list = []
        if self.castling_kingside_possible():
            if self.white_to_play:
                king = self.board[4]
                rook = self.board[7]
                move = Move()
                move.add_change(4, king, None)
                move.add_change(5, None, rook)
                move.add_change(6, None, king)
                move.add_change(7, rook, None)
                move_list.append(move)
            else:
                king = self.board[60]
                rook = self.board[63]
                move = Move()
                move.add_change(60, king, None)
                move.add_change(61, None, rook)
                move.add_change(62, None, king)
                move.add_change(63, rook, None)
                move_list.append(move)
        if self.castling_queenside_possible():
            if self.white_to_play:
                king = self.board[4]
                rook = self.board[0]
                move = Move()
                move.add_change(4, king, None)
                move.add_change(3, None, rook)
                move.add_change(2, None, king)
                move.add_change(0, rook, None)
                move_list.append(move)
            else:
                king = self.board[60]
                rook = self.board[56]
                move = Move()
                move.add_change(60, king, None)
                move.add_change(59, None, rook)
                move.add_change(58, None, king)
                move.add_change(56, rook, None)
                move_list.append(move)
        return move_list
Return a list of Move-objects corresponding to all possible castlings
        in this position. It is assumed that no moves have been made to the game state
        for while using this method.
Return a list of Move-objects corresponding to all possible castlings
in this position. It is assumed that no moves have been made to the game state
for while using this method.
Return a list of Move - objects corresponding to all possible castlings in this position . It is assumed that no moves have been made to the game state for while using this method .
def castlings(self):
        move_list = []
        if self.castling_kingside_possible():
            if self.white_to_play:
                king = self.board[4]
                rook = self.board[7]
                move = Move()
                move.add_change(4, king, None)
                move.add_change(5, None, rook)
                move.add_change(6, None, king)
                move.add_change(7, rook, None)
                move_list.append(move)
            else:
                king = self.board[60]
                rook = self.board[63]
                move = Move()
                move.add_change(60, king, None)
                move.add_change(61, None, rook)
                move.add_change(62, None, king)
                move.add_change(63, rook, None)
                move_list.append(move)
        if self.castling_queenside_possible():
            if self.white_to_play:
                king = self.board[4]
                rook = self.board[0]
                move = Move()
                move.add_change(4, king, None)
                move.add_change(3, None, rook)
                move.add_change(2, None, king)
                move.add_change(0, rook, None)
                move_list.append(move)
            else:
                king = self.board[60]
                rook = self.board[56]
                move = Move()
                move.add_change(60, king, None)
                move.add_change(59, None, rook)
                move.add_change(58, None, king)
                move.add_change(56, rook, None)
                move_list.append(move)
        return move_list
def castlings ( self ) : move_list = [ ] if self . castling_kingside_possible ( ) : if self . white_to_play : king = self . board [ 4 ] rook = self . board [ 7 ] move = Move ( ) move . add_change ( 4 , king , None ) move . add_change ( 5 , None , rook ) move . add_change ( 6 , None , king ) move . add_change ( 7 , rook , None ) move_list . append ( move ) else : king = self . board [ 60 ] rook = self . board [ 63 ] move = Move ( ) move . add_change ( 60 , king , None ) move . add_change ( 61 , None , rook ) move . add_change ( 62 , None , king ) move . add_change ( 63 , rook , None ) move_list . append ( move ) if self . castling_queenside_possible ( ) : if self . white_to_play : king = self . board [ 4 ] rook = self . board [ 0 ] move = Move ( ) move . add_change ( 4 , king , None ) move . add_change ( 3 , None , rook ) move . add_change ( 2 , None , king ) move . add_change ( 0 , rook , None ) move_list . append ( move ) else : king = self . board [ 60 ] rook = self . board [ 56 ] move = Move ( ) move . add_change ( 60 , king , None ) move . add_change ( 59 , None , rook ) move . add_change ( 58 , None , king ) move . add_change ( 56 , rook , None ) move_list . append ( move ) return move_list
Return a list of Move-objects corresponding to all possible castlings
in this position.
Return a list of Move - objects corresponding to all possible castlings in this position .
"""Return a list of Move-objects corresponding to all possible castlings
        in this position. It is assumed that no moves have been made to the game state
        for while using this method."""
self