Skip to content

Commit

Permalink
Assert to protect
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
bpiwowar committed Nov 16, 2023
1 parent 9d3f3bd commit 5f8ed1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pystk2_gymnasium/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ def __init__(self, *, agents: List[AgentSpec] = None, **kwargs):

# Setup the variables
self.agents = agents
assert len(self.agents) <= self.num_kart, f"Too many agents ({len(self.agents)}) for {self.num_kart} karts"

# Kart index for each agent (set when the race is setup)
self.kart_indices = None
Expand Down

0 comments on commit 5f8ed1d

Please sign in to comment.