Beispiel #1
0
 def test_add_turf_with_coordinates_in_a_room(self):
     door = Door()
     door.x, door.y = 0, 1
     self.room.add(door)
     turfs = self.room.get(x=door.x, y=door.y)
     self.assertIn(door, turfs)
     self.assertEqual(len(turfs), 2)
     self.assertEqual(door.z, 1)
Beispiel #2
0
 def test_add_turf_outside_the_room(self):
     door = Door()
     door.x, door.y = 9, 9
     with self.assertRaises(Room.TurfCoordinatesOutsideRoomBoundaries):
         self.room.add(door)