@staticmethod<EOL><INDENT>def _rotate(pair, step):<DEDENT>
step = Step(step)<EOL>movement = {<EOL>"<STR_LIT>": "<STR_LIT>", <EOL>"<STR_LIT:D>": "<STR_LIT>", <EOL>"<STR_LIT:R>": "<STR_LIT>", <EOL>"<STR_LIT:L>": "<STR_LIT>", <EOL>"<STR_LIT:F>": "<STR_LIT>", <EOL>"<STR_LIT:B>": "<STR_LIT>", <EOL>}[step.face]<EOL>movement = {<EOL>movement[i]: movement[(i + step.is_clockwise + (-<NUM_LIT:1> * step.is_counter_clockwise) + (<NUM_LIT:2> * step.is_180)) % <NUM_LIT:4>]<EOL>for i in range(<NUM_LIT:4>)<EOL>}<EOL>for cubie in pair:<EOL><INDENT>if step.face not in cubie:<EOL><INDENT>if cubie.type == "<STR_LIT>":<EOL><INDENT>result_edge = cubie.copy()<EOL><DEDENT>else:<EOL><INDENT>result_corner = cubie.copy()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>result = {}<EOL>for face, square in cubie:<EOL><INDENT>if face not in movement:<EOL><INDENT>result[face] = square<EOL><DEDENT>else:<EOL><INDENT>result[movement[face]] = square<EOL><DEDENT><DEDENT>if len(result) == <NUM_LIT:2>:<EOL><INDENT>result_edge = Edge(**result)<EOL><DEDENT>else:<EOL><INDENT>result_corner = Corner(**result)<EOL><DEDENT><DEDENT><DEDENT>return (result_corner, result_edge)<EOL>
Simulate the cube rotation by updating the pair.