diff --git a/examples/st_game/plan/st_plan.py b/examples/st_game/plan/st_plan.py index 4e63bc7a1..b17819ca0 100644 --- a/examples/st_game/plan/st_plan.py +++ b/examples/st_game/plan/st_plan.py @@ -44,7 +44,7 @@ def plan(role: "STRole", maze: Maze, roles: dict["STRole"], new_day: bool, retri # ["thoughts"] = [, ...]} focused_event = False if retrieved.keys(): - focused_event = _choose_retrieved(role, retrieved) + focused_event = _choose_retrieved(role.name, retrieved) # Step 2: Once we choose an event, we need to determine whether the # role will take any actions for the perceived event. There are diff --git a/examples/st_game/tests/plan/test_st_plan.py b/examples/st_game/tests/plan/test_st_plan.py index 26901d35d..9b04d70ae 100644 --- a/examples/st_game/tests/plan/test_st_plan.py +++ b/examples/st_game/tests/plan/test_st_plan.py @@ -17,10 +17,11 @@ def test_should_react(): observed = role_ir.observe() retrieved = role_ir.retrieve(observed) - focused_event = _choose_retrieved(role_ir, retrieved) + focused_event = _choose_retrieved(role_ir.name, retrieved) - reaction_mode = _should_react(role_ir, focused_event, roles) # chat with Isabella Rodriguez - assert "chat with" in reaction_mode + if focused_event: + reaction_mode = _should_react(role_ir, focused_event, roles) # chat with Isabella Rodriguez + assert "chat with" in reaction_mode def test_wait_react():