Example #1
0
 def test_should_create_tower_at_tripple_height(self):
     p = Position()
     singleLayer = createLayerAt(p, 0)
     steps = createStep(p, 0)
     height = 3
     result = createTowerAt(p, height)
     skippedForDoor = 2
     firstWindow = 1
     self.assertEqual(
         len(result),
         height * len(singleLayer + steps) - skippedForDoor - firstWindow)
Example #2
0
 def test_when_at_height_6_should_keep_window_open_in_wall_to_the_front(
         self):
     result = createLayerAt(self.p, 5)
     self.assertTrue(excludes((-1, 5, 2))(result))
Example #3
0
 def test_when_at_height_5_should_keep_window_open_in_wall_to_the_left(
         self):
     result = createLayerAt(self.p, 4)
     self.assertTrue(excludes((-3, 4, 4))(result))
Example #4
0
 def test_when_at_height_4_should_keep_window_open_in_wall_to_the_back(
         self):
     result = createLayerAt(self.p, 3)
     self.assertTrue(excludes((-1, 3, 6))(result))
Example #5
0
 def test_when_at_height_3_should_keep_window_open_in_wall_to_the_right(
         self):
     result = createLayerAt(self.p, 2)
     self.assertTrue(excludes((1, 2, 4))(result))
Example #6
0
 def test_should_position_center_according_to_passed_in_position(self):
     p = Position(1, 2, 3)
     result = createLayerAt(p, 0)
     self.assertTrue(findExactlyIn((0, 2, 7))(result))
Example #7
0
 def setUp(self):
     self.p = Position()
     self.resultZero = createLayerAt(self.p, 0)
     self.resultOne = createLayerAt(self.p, 1)