public class Waldo extends Object
Constructor and Description |
---|
Waldo(int location)
Initializes this Waldo to have the specified location.
|
Modifier and Type | Method and Description |
---|---|
int |
closer(int locA,
int locB)
Determines which of two locations is closer to Waldo.
|
public Waldo(int location)
location
- a locationpublic int closer(int locA, int locB)
locA
- a locationlocB
- a second location