Fixed grammar, unified the docstring's format and added documentation to some classes that did not have any. Closes #32.

This commit is contained in:
eichhornchen
2020-12-13 21:29:25 +01:00
parent 3f62fbaa2b
commit 646e0063be
24 changed files with 254 additions and 170 deletions

View File

@ -14,7 +14,7 @@ from squirrelbattle.resources import ResourceManager
class TestEntities(unittest.TestCase):
def setUp(self) -> None:
"""
Load example map that can be used in tests.
Loads example map that can be used in tests.
"""
self.map = Map.load(ResourceManager.get_asset_path("example_map.txt"))
self.player = Player()
@ -23,7 +23,7 @@ class TestEntities(unittest.TestCase):
def test_basic_entities(self) -> None:
"""
Test some random stuff with basic entities.
Tests some random stuff with basic entities.
"""
entity = Entity()
entity.move(42, 64)
@ -38,7 +38,7 @@ class TestEntities(unittest.TestCase):
def test_fighting_entities(self) -> None:
"""
Test some random stuff with fighting entities.
Tests some random stuff with fighting entities.
"""
entity = Tiger()
self.map.add_entity(entity)
@ -91,7 +91,7 @@ class TestEntities(unittest.TestCase):
def test_items(self) -> None:
"""
Test some random stuff with items.
Tests some random stuff with items.
"""
item = Item()
self.map.add_entity(item)
@ -112,7 +112,7 @@ class TestEntities(unittest.TestCase):
def test_bombs(self) -> None:
"""
Test some random stuff with bombs.
Tests some random stuff with bombs.
"""
item = Bomb()
hedgehog = Hedgehog()
@ -156,7 +156,7 @@ class TestEntities(unittest.TestCase):
def test_hearts(self) -> None:
"""
Test some random stuff with hearts.
Tests some random stuff with hearts.
"""
item = Heart()
self.map.add_entity(item)
@ -171,7 +171,7 @@ class TestEntities(unittest.TestCase):
def test_body_snatch_potion(self) -> None:
"""
Test some random stuff with body snatch potions.
Tests some random stuff with body snatch potions.
"""
item = BodySnatchPotion()
self.map.add_entity(item)
@ -189,7 +189,7 @@ class TestEntities(unittest.TestCase):
def test_players(self) -> None:
"""
Test some random stuff with players.
Tests some random stuff with players.
"""
player = Player()
self.map.add_entity(player)