@staticmethod<EOL><INDENT>def _rotate(edges, step):<DEDENT>
step = Step(step)<EOL>result = set()<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 edge in edges:<EOL><INDENT>if step.face not in edge:<EOL><INDENT>result.add(edge.copy())<EOL><DEDENT>else:<EOL><INDENT>k = (set(edge.facings.keys()) - {step.face}).pop()<EOL>new_edge = Edge(**{<EOL>step.face: edge[step.face], <EOL>movement[k]: edge[k], <EOL>})<EOL>result.add(new_edge)<EOL><DEDENT><DEDENT>return result<EOL>
Simulate the cube rotation by updating four edges.