Skip to content

Commit

Permalink
missing entity stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lunathanael committed Mar 11, 2024
1 parent f88e1c0 commit eadca1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion clash_royale/envs/game_engine/arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from typing import TYPE_CHECKING

from clash_royale.envs.game_engine.entities.entity import EntityCollection
from clash_royale.envs.game_engine.entities.entity import Entity, EntityCollection

if TYPE_CHECKING:
# Only import for typechecking to prevent circular dependency
Expand Down Expand Up @@ -43,3 +43,6 @@ def reset(self) -> None:

def step(self) -> None:
pass

def get_entities(self) -> List[Entity]:
pass
4 changes: 2 additions & 2 deletions clash_royale/envs/game_engine/game_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def reset(self) -> None:
Arena.reset() method missing.
Player.reset() method missing.
"""

self.arena.reset()
self.player1.reset(elixir=5)
self.player2.reset(elixir=5)
Expand All @@ -84,7 +84,7 @@ def make_image(self, player_id: int) -> npt.NDArray[np.uint8]:
arena.get_entities() missing
"""

entities = self.arena.get_entities()
entities: List[Entity] = self.arena.get_entities()
canvas = pygame.Surface(size=self.resolution)

#rendering logic goes here...
Expand Down

0 comments on commit eadca1b

Please sign in to comment.