Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public static int firstX(int max) {
  2. x=-250;
  3. return x;
  4. }
  5.  
  6. public static int firstY(int max) {
  7. y=100;
  8. return y;
  9.  
  10. }
  11.  
  12. public static int nextX(int max) {
  13. x++;
  14. return x;
  15.  
  16. }
  17.  
  18. public static int nextY(int max) {
  19. y++;
  20. return y;
  21. }
  22.  
  23. public static int nextColor() {
  24. int a = 100;
  25. while (x<250) {
  26. if (y >= 250) {
  27. x=-250;
  28. y=y-a;
  29. a=a+100;
  30. return EtchASketch.GAP;
  31. }
  32. else {
  33. return EtchASketch.BLACK;
  34. }
  35. }
  36. return EtchASketch.BLACK;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement