Guest User

Untitled

a guest
Mar 13th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public void act()
  2. {
  3.  
  4.  
  5. if (steps <= sideLength && canMove())
  6. {
  7. move();
  8. steps++;
  9. if(steps == sideLength)
  10. {
  11. setDirection(225);
  12.  
  13. }
  14. }
  15.  
  16.  
  17. if( steps <= sideLength*2 && canMove())
  18. {
  19. move();
  20. steps++;
  21.  
  22. if (steps == sideLength*2)
  23. {
  24. setDirection(90);
  25. }
  26. }
  27.  
  28.  
  29.  
  30.  
  31. if(steps<sideLength*3 && canMove())
  32. {
  33. move();
  34. steps++;
  35. }
  36.  
  37. }
  38.  
  39.  
  40.  
  41.  
  42. }
Add Comment
Please, Sign In to add comment