Skip to content

Instantly share code, notes, and snippets.

@RyanNutt
Last active September 3, 2018 22:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanNutt/1bb2b33ce0fb1045a8e30aa66ad7fa3d to your computer and use it in GitHub Desktop.
Save RyanNutt/1bb2b33ce0fb1045a8e30aa66ad7fa3d to your computer and use it in GitHub Desktop.
Mockup of a Jeroo class file. See https://compsci.rocks/jeroo-demo-class-file/
public class Jeroo {
private int row;
private int column;
private int flowers;
public Jeroo() {}
public Jeroo(int flowers) {}
public Jeroo(int row, int col) {}
public Jeroo(int row, int col, int flowers) {}
public Jeroo(int row, int col, Dir dir) {}
public Jeroo(int row, int col, Dir dir, int flowers) {}
public void hop() {}
public void hop(int howMany) {}
public void pick() {}
public void plant() {}
public void toss() {}
public void give() {}
public void give(Dir dir) {}
public void turn(Dir dir) {}
public boolean hasFlower() {}
public boolean isFacing(Dir dir) {}
public boolean isFlower(Dir dir) {}
public boolean isJeroo(Dir dir) {}
public boolean isNet(Dir dir) {}
public boolean isWater(Dir dir) {}
public boolean isClear(Dir dir) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment