Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. int yardLine, people, x=130, row, collum=175, count;
  2. color orange = color(242, 163, 2);
  3. color blue = color(0, 255, 0);
  4. int randomNumber;
  5. void setup()
  6. {
  7. size(800, 500);
  8. background(0);
  9. noStroke();
  10. //dirt
  11. fill(#E8DBB7);
  12. rect(0, 250, 800, 250);
  13. //stand
  14. fill(#794F01);
  15. rect(75, 125, 650, 175);
  16. //moon
  17. fill(255);
  18. ellipse(50, 75, 75, 75);
  19. //field
  20. fill(#205A1F);
  21. quad(75, 300, 725, 300, 685, 450, 45, 450);
  22. fill(255);
  23. fill(0, 0, 255);
  24. textSize(27);
  25. text("Seven Lake Spartans", 100, 50);
  26. }
  27.  
  28. void draw()
  29. {
  30. yardLines();
  31. crowd();
  32. }
  33.  
  34. void yardLines()
  35. {
  36. while (yardLine<=10)
  37. {
  38. textSize(15);
  39. fill(255);
  40. text("" + yardLine, x-10, 425);
  41. text("" + yardLine, x+10, 325);
  42. stroke(255);
  43. strokeWeight(3);
  44. line(x-26, 450, x, 300);
  45. yardLine = yardLine+1;
  46. x+=50;
  47. }
  48. }
  49.  
  50. void crowd()
  51. {
  52. int row= 150;
  53. while (row<300)
  54. {
  55. randomNumber=(int)random(1,3);
  56. if (randomNumber ==1)
  57. {
  58. fill(0,0,255);
  59. }
  60. if(randomNumber==2)
  61. {
  62. fill(orange);
  63. collum=112;
  64. while (collum<700)
  65. {
  66. ellipse(collum, row, 18, 18);
  67. collum+=30;
  68. }
  69. row+=30;
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement