Пример #1
0
 def test_get_orientation_none(self):
     game = Game()
     orientation = game.get_orientation(
         [Board.MIDDLE, (Board.MIDDLE[0] + 1, Board.MIDDLE[1] + 1)])
     self.assertEqual(orientation, Orientation.NONE)
Пример #2
0
 def test_get_orientation_horizontal(self):
     game = Game()
     orientation = game.get_orientation(
         [Board.MIDDLE, (Board.MIDDLE[0], Board.MIDDLE[1] + 1)])
     self.assertEqual(orientation, Orientation.HORIZONTAL)
Пример #3
0
 def test_get_orientation_vertical(self):
     game = Game()
     orientation = game.get_orientation(
         [Board.MIDDLE, (Board.MIDDLE[0] + 1, Board.MIDDLE[1])])
     self.assertEqual(orientation, Orientation.VERTICAL)
Пример #4
0
 def test_get_orientation_single(self):
     game = Game()
     orientation = game.get_orientation([Board.MIDDLE])
     self.assertEqual(orientation, Orientation.HORIZONTAL)