Skip to content

Lab 3 inRoom() method #12

Description

@gjf2a

inRoom() is really hard and needs more scaffolding. Perhaps one way to do this could be:

  • Introduce a positionLoop() method that returns an array with the states of each of the four cells we reach walking in a specified direction.
  • Outline an implementation of inRoom() where you call positionLoop() for every possible direction. You then count how many are clear. If all four are clear you are in a room.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions