Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public void act()
  2. {
  3.  
  4. step++;
  5.  
  6.  
  7.  
  8. if(canMove() == true)
  9. {
  10. if(step%2 == 0)
  11. {
  12.  
  13. if(getColor().equals(new Color (150,0,150)))
  14. {
  15. setColor(originalColor);
  16. }
  17. else
  18. {
  19. originalColor = getColor();
  20. }
  21. move();
  22. }
  23. }
  24. else
  25. {
  26. if(step%2 == 0)
  27. {
  28. setColor(new Color(150,0,150));
  29. turn();
  30. }
  31. }
  32.  
  33.  
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement