예제 #1
0
  /*
  ****************** CHECKLIST ******************************
  [x] the size of the scribble MUST be controlled linearly by the value of scale
  [x] use tu.moveTo()

  */
  boolean scrible(int xPos, int yPos, double scale) {
    Turtle tu = new Turtle(this);

    tu.penUp();
    tu.moveTo(xPos, yPos);
    tu.penDown();

    int size = (int) scale;

    tu.penUp();
    tu.forward(size / 2);
    tu.penDown();
    tu.turn(-90);
    for (int i = 0; i < 28; i++) {
      size = size - 10;
      tu.forward(size);
      tu.turn(-90);
      tu.forward(size);
      tu.turn(-90);
    }

    return true;
  }