Skip to content

Instantly share code, notes, and snippets.

@evanc
Created August 29, 2014 03:48
Show Gist options
  • Save evanc/a3471025776ad6870133 to your computer and use it in GitHub Desktop.
Save evanc/a3471025776ad6870133 to your computer and use it in GitHub Desktop.
public static void main (String[] args) {
Turtle bobTheBuilder = new Turtle();
drawWindow(bobTheBuilder, 100, 50);
drawWindow(bobTheBuilder, 400, 50);
}
public static void drawWindow(Turtle myTurtle, int x, int y) {
myTurtle.move(x, y);
myTurtle.paint(0, 40);
myTurtle.paint(90, 30);
myTurtle.paint(90, 40);
myTurtle.paint(90, 30);
myTurtle.paint(90, 20);
// etc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment