예제 #1
0
 def test_rotate_right(self):
     _side_a = ((1, 0), (1, 0), (1, 1), (1, 0))
     _side_b = ((1, 0), (1, 1), (1, 1), (1, 0))
     _side_a_rotated = ((1, 1, 1, 1), (0, 1, 0, 0))
     _side_b_rotated = ((1, 1, 1, 1), (0, 1, 1, 0))
     _object = FitObject(_side_a, _side_b)
     _object.rotate_right()
     self.assertTupleEqual(_side_a_rotated, _object.side_a)
     self.assertTupleEqual(_side_b_rotated, _object.side_b)
예제 #2
0
 def test_rotate_right_4_times(self):
     _side_a = ((1, 0), (1, 0), (1, 1), (1, 0))
     _side_b = ((1, 0), (1, 1), (1, 1), (1, 0))
     _object = FitObject(_side_a, _side_b)
     _object.rotate_right()
     _object.rotate_right()
     _object.rotate_right()
     _object.rotate_right()
     self.assertTupleEqual(_side_a, _object.side_a)
     self.assertTupleEqual(_side_b, _object.side_b)