Advertisement
Candlemaster

Untitled

Jul 6th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. public void drawT(int size){ // the parameter letter of H T and E are normal and not
  2. this.penDown(); // hollow like the drawWord() versions
  3. this.forward(size); //this is the parameter version of T
  4. this.turnRight();
  5. this.forward(size/2);
  6. this.backward(size);
  7. this.penUp();
  8. }
  9.  
  10. public void drawH(int size){ // this is the parameter version of drawH
  11. this.penDown(); // I was going to use two variables initially
  12. this.forward(size); // then realized H works better with just one variable.
  13. this.backward(size/2);
  14. this.turnRight();
  15. forward(size/3);
  16. this.turnLeft();
  17. forward(size/2);
  18. backward(size);
  19. this.penUp();
  20. }
  21. public void drawH(int size){ // this is the parameter version of drawE
  22.  
  23.  
  24. public void drawT(){ // The letter helper methods are first declared to make the
  25. this.penDown(); // drawWord() method look much cleaner. Each letter opens
  26. this.forward(30); // with the pen being up as to avoid cluttering drawWord()
  27. this.turnRight(); // as well as to allow easier movement of the turtle.
  28. this.forward(30);
  29. this.turnLeft();
  30. this.forward(15);
  31. this.turnLeft();
  32. this.forward(80);
  33. this.turnLeft();
  34. this.forward(15);
  35. this.turnLeft();
  36. this.forward(30);
  37. this.turnRight();
  38. this.forward(60);
  39. this.turnLeft();
  40. this.forward(20);
  41. this.turnLeft();
  42. this.forward(30);
  43. this.penUp();
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement