예제 #1
0
 def test_move_a_over_b_where_b_is_not_a_list(self):
     blocks = BlockSet(6)
     assert_equals(blocks.move_a_onto_b(a = 4, b = 2), [0, 1, [4, 2], 3, -1, 5])
     assert_equals(blocks.move_a_over_b(a = 2, b = 3), [0, 1, -1, [2, 3], 4, 5])
예제 #2
0
 def test_move_a_over_b_takes_off_all_blocks_stacked_in_a(self):
     blocks = BlockSet(6)
     assert_equals(blocks.move_a_onto_b(a = 4, b = 2), [0, 1, [4, 2], 3, -1, 5])
     assert_equals(blocks.move_a_onto_b(a = 5, b = 3), [0, 1, [4, 2], [5, 3], -1, -1])
     assert_equals(blocks.move_a_over_b(a = 2, b = 3), [0, 1, -1, [2, 5, 3], 4, -1])