Skip to content

Commit

Permalink
fix: Kurono code changes in game and starter/hint code (#1792)
Browse files Browse the repository at this point in the history
* change worksheet texts

* add a space before 'If'

* Merge remote-tracking branch 'origin/master' into 1459-kurono-code-changes-in-game-and-starterhint-code
  • Loading branch information
cewei8483 committed Jul 21, 2023
1 parent d1ae365 commit 4630e7d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions aimmo/worksheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def __post_init__(self):
#
# Task 3: Investigate location
# - Investigate what `print(avatar_state.location)` tells you and then
# check if you can move to the next location
# check if you can move to the next location. If you can't move to the
# next location, have your avatar wait until the next turn.
#
# New commands:
# - MoveAction(DIRECTION)
# - WaitAction()
# - avatar_state.location -> LOCATION
# - world_state.can_move_to(LOCATION) -> True/False
#
Expand All @@ -68,7 +70,8 @@ def next_turn(world_state, avatar_state):
# Worksheet 2 challenges:
# Task 1: Avoiding obstacles
# - Change the code so that your avatar tries a different direction if
# they are unable to move. To avoid repeating code, create a subroutine
# they are unable to move. Keep trying a new random direction, until your
# avatar can move. To avoid repeating code, create a subroutine
# called get_random_dir() and use it to return a random direction.
#
# Task 2: Pick up an artefact
Expand All @@ -78,10 +81,12 @@ def next_turn(world_state, avatar_state):
#
# New commands:
# - action = PickupAction()
# - world_state.cells[LOCATION].has_artefact() -> True/False
#
# Previous commands:
# - avatar_state.location -> LOCATION
# - MoveAction(DIRECTION)
# - WaitAction()
# - world_state.can_move_to(LOCATION) -> True/False
#-------------------------------------------------------------------------------
import random
Expand Down

0 comments on commit 4630e7d

Please sign in to comment.