Skip to content

Commit

Permalink
fix: Channels dont change type from bool to int
Browse files Browse the repository at this point in the history
  • Loading branch information
strakam committed Dec 4, 2024
1 parent e784a65 commit 0e540b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generals/core/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, grid: np.ndarray, _agents: list[str]):

def get_visibility(self, agent_id: str) -> np.ndarray:
channel = self._ownership[agent_id]
return maximum_filter(channel, size=3)
return maximum_filter(channel, size=3).astype(bool)

@staticmethod
def channel_to_indices(channel: np.ndarray) -> np.ndarray:
Expand Down

0 comments on commit 0e540b6

Please sign in to comment.