|
Action
Methods
hop(); hop(n); where n > 0 pick(); plant(); toss(); give( relative_direction); turn( relative_direction ); |
Each Boolean method returns a value of true or false.
hasFlower() isFacing( compass_direction ) isFlower( relative_direction ) isJeroo( relative_direction ) isNet( relative_direction ) isWater( relative_direction ) isClear( relative_direction ) |
Directions:
Relative Directions: LEFT, RIGHT, AHEAD, HERE
Compass Directions: NORTH, SOUTH, EAST, WEST
Constructors |
Attributes |
Jeroo Kim = new Jeroo();
|
Location: (0,0) |
Jeroo Kim = new Jeroo(8);
|
Location: (0,0) |
Jeroo Kim = new Jeroo(3,4);
|
Location: (3,4) |
Jeroo Kim = new Jeroo(3,4,WEST);
|
Location: (3,4) |
Jeroo Kim = new Jeroo(3,4,8);
|
Location: (3,4) |
Jeroo Kim = new Jeroo(3,4,SOUTH,8);
|
Location: (3,4) |
A condition is just a Boolean expression -- an expression that is either true or false.