Skip to content

Commit

Permalink
chore: remove extra lmabda function
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthsingh1 committed Jan 8, 2024
1 parent 73a35d9 commit 8b03169
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions jumanji/environments/routing/pacman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,8 @@ def check_collisions(
old_ghost_pos: chex.Array,
) -> Tuple[chex.Array, chex.Numeric, chex.Numeric, chex.Numeric, chex.Numeric]:
"""Check if ghost has collided with player"""
eat = lambda: True
no_eat = lambda: False
frightened_time = state.frightened_state_time

is_eat = jax.lax.cond(frightened_time > 0, eat, no_eat)
is_eat = frightened_time > 0

ghost_p = Position(y=ghost_pos[0], x=ghost_pos[1])
old_ghost_p = Position(y=old_ghost_pos[0], x=old_ghost_pos[1])
Expand Down

0 comments on commit 8b03169

Please sign in to comment.