Exemple #1
0
 def test_shift_coords_positive_x(self):
     negative_coords = [(-100, 0), (-50, 100), (-100, 0), (-50, 100)]
     expected_coords = [(0, 0), (50, 100), (0, 0), (50, 100)]
     self.assertEqual(Blockies.shift_coords_positive(negative_coords),
                      expected_coords)
Exemple #2
0
 def test_shift_coords_positive_y(self):
     negative_coords = [(100, -75), (150, -60), (100, -75), (150, -60)]
     expected_coords = [(100, 0), (150, 15), (100, 0), (150, 15)]
     self.assertEqual(Blockies.shift_coords_positive(negative_coords),
                      expected_coords)
Exemple #3
0
 def test_shift_coords_positive_xy(self):
     negative_coords = [(-1, -1), (0, -1), (-1, 0), (0, 0)]
     expected_coords = [(0, 0), (1, 0), (0, 1), (1, 1)]
     self.assertEqual(Blockies.shift_coords_positive(negative_coords),
                      expected_coords)