<s> from engines import Engine <EOL> from copy import deepcopy <EOL> class OneplyEngine ( Engine ) : <EOL> """<STR_LIT>""" <EOL> def get_move ( self , board , color , move_num = None , <EOL> time_remaining = None , time_opponent = None ) : <EOL> """<STR_LIT>""" <EOL> moves = board . get_legal_moves ( color ) <EOL> return max ( moves , key = lambda move : self . _get_cost ( board , color , move ) ) <EOL> def _get_cost ( self , board , color , move ) : <EOL> """<STR_LIT>""" <EOL> newboard = deepcopy ( board ) <EOL> newboard . execute_move ( move , color ) <EOL> num_pieces_op = len ( newboard . get_squares ( color * - <NUM_LIT:1> ) ) <EOL> num_pieces_me = len ( newboard . get_squares ( color ) ) <EOL> return num_pieces_me - num_pieces_op <EOL> engine = OneplyEngine </s>
