Entities are living during two ticks, fixes #80
This commit is contained in:
		@@ -209,7 +209,8 @@ class TestEntities(unittest.TestCase):
 | 
			
		||||
        self.assertNotIn(explosion, self.player.inventory)
 | 
			
		||||
        self.assertIsNone(explosion.held_by)
 | 
			
		||||
 | 
			
		||||
        # The explosion disappears after one tick
 | 
			
		||||
        # The explosion disappears after two ticks
 | 
			
		||||
        explosion.act(self.map)
 | 
			
		||||
        explosion.act(self.map)
 | 
			
		||||
        self.assertNotIn(explosion, self.map.entities)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -255,6 +255,7 @@ class TestGame(unittest.TestCase):
 | 
			
		||||
        self.game.map.add_entity(explosion)
 | 
			
		||||
        self.assertIn(explosion, self.game.map.entities)
 | 
			
		||||
        self.game.handle_key_pressed(KeyValues.WAIT)
 | 
			
		||||
        self.game.handle_key_pressed(KeyValues.WAIT)
 | 
			
		||||
        self.assertNotIn(explosion, self.game.map.entities)
 | 
			
		||||
 | 
			
		||||
        rabbit = Rabbit()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user