Skip to content

Commit

Permalink
added is_game_over template function in struct
Browse files Browse the repository at this point in the history
  • Loading branch information
lunathanael committed Mar 12, 2024
1 parent 099cca7 commit 4569c39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clash_royale/envs/game_engine/arena.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

from typing import TYPE_CHECKING

import numpy as np
import numpy.typing as npt

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

Expand Down Expand Up @@ -50,3 +53,6 @@ def get_entities(self) -> List[Entity]:

def play_card(self, x: int, y: int, card: Card) -> None:
pass

def get_placement_mask(self) -> npt.NDArray[bool]:
return np.ones(shape=(32, 18), dtype=bool)
3 changes: 3 additions & 0 deletions clash_royale/envs/game_engine/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def game_state(self) -> int:
ex: Game is over, double elixir, overtime, etc.
"""
return 0

def is_game_over(self) -> bool:
return False



Expand Down

0 comments on commit 4569c39

Please sign in to comment.