Ad
  • Default User Avatar

    It should be failling because the comparation of null values with true

  • Default User Avatar

    Dont know but in my opinion is needed to create a multidimentional array of (21 * 21)
    and to place the person in the center of this matrix [11][11].

    After place the person in the position it will be neede to create a mechanism that
    executes the displacement of the person in the array taking in account the next steps:

    1. Each time the user moves one step to north it will have to move ([i-1][j]).
    2. Each time the user moves one step to south it will have to move ([i+1][j]).
    3. Each time the user moves one step to east it will have to move ([i][j+1]).
    4. Each time the user moves one step to west it will have to move ([i][j-1]).

    at the end of the execution if the person is on the [11][11] array position, it
    will be compliant with the expected behavior.

  • Default User Avatar

    Is this wanting to us build a graph where you know the initial position, in order to validate if
    is a valid walkthrought, did you miss something in the enunciate?.