def test_reverse_box(): state = State(*list(level_reverse_box.values())) previous_states = state.prev_states() previous_states = {state.__str__() for state in previous_states} assert previous_states == {'#####\n# p #\n# B#\n# S#\n#####\n', '#####\n# #\n#p B#\n# S#\n#####\n', '#####\n# #\n#pB #\n# S#\n#####\n', '#####\n# #\n# B#\n# pS#\n#####\n'}
def test_reverse_box_on_storage(): state = State(*list(level_reverse_box_on_storage.values())) previous_states = state.prev_states() previous_states = {state.__str__() for state in previous_states} assert previous_states == {'#####\n# #\n# $#\n# p #\n#####\n', '#####\n# #\n#p $#\n# #\n#####\n', '#####\n# p #\n# $#\n# #\n#####\n', '#####\n# #\n#pBS#\n# #\n#####\n'}
def test_reverse_no_boxes(): state = State(*list(level_reverse_no_boxes.values())) previous_states = state.prev_states() previous_players = {state.player for state in previous_states} assert previous_players == {(2, 1), (1, 2), (3, 2), (2, 3)}