SHARE
TWEET

Untitled

a guest Jun 19th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Frog extends Critter (int age){
  2.    int x = age-1;
  3.    
  4.    public Color getColor(){
  5.       return Color.GREEN;
  6.    }
  7.    
  8.    public Direction getMove(){
  9.       age++;
  10.      
  11.       if (x % age == 0)
  12.       return Direction.CENTER;
  13.      
  14.       return Direction.EAST;
  15.      
  16.    }
  17.    
  18.    public String toString(){
  19.       return "F";
  20.    }
  21. }
RAW Paste Data
Top