Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: update starter code for worksheet 3 (#1617)
Browse files Browse the repository at this point in the history
* fix: update starter code for worksheet 3
  • Loading branch information
razvan-pro authored Feb 8, 2022
1 parent 8413867 commit e870b64
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions aimmo/worksheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,9 @@ def next_turn(world_state, avatar_state):
# - action = PickupAction()
#-------------------------------------------------------------------------------
def next_turn(world_state, avatar_state):
# scan_nearby() returns a list of the nearest artefacts
nearby = world_state.scan_nearby(avatar_state.location)
# Head towards the nearest artefact
nearest = nearby[0]
action = MoveTowardsAction(nearest)
new_dir = direction.NORTH
# Your code goes here
action = MoveAction(new_dir)
return action
""",
active_image_path="images/worksheets/ancient_active.png",
Expand Down

0 comments on commit e870b64

Please sign in to comment.