Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Frog extends Critter (int age){
- int x = age-1;
- public Color getColor(){
- return Color.GREEN;
- }
- public Direction getMove(){
- age++;
- if (x % age == 0)
- return Direction.CENTER;
- return Direction.EAST;
- }
- public String toString(){
- return "F";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement