Create an account
public int getRow(), public int getCol()
Accessor methods that return the row or column of the Location
public Location getAdjacentLocation (int direction)
Returns the adjacent location in the compass direction closest to direction.
public int getdirectionToward(Location target)
Returns the direction, rounded to the nearest compass direction, from this location toward a target location.
public boolean equals(Object other), public int compareTo(Object other)
Compares Location objects. Two locations are equal if they have the same tow and column values. Ascending order for location is row-major, namely, start at (0,0) and proceed row by row from left to right.
Please allow access to your computer’s microphone to use Voice Recording.
Having trouble? Click here for help.
We can’t access your microphone!
Click the icon above to update your browser permissions and try again
Reload the page to try again!Reload
Press Cmd-0 to reset your zoom
Press Ctrl-0 to reset your zoom
It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.
Please upgrade Flash or install Chrome
to use Voice Recording.
For more help, see our troubleshooting page.
Your microphone is muted
For help fixing this issue, see this FAQ.
Star this term
You can study starred terms together