Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 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, 0, 255);
  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.  
  29. void draw()
  30. {
  31. yardLines();
  32. crowd();
  33. }
  34.  
  35. void yardLines()
  36. {
  37. while (yardLine<=10)
  38. {
  39. textSize(15);
  40. fill(255);
  41. text("" + yardLine, x-10, 425);
  42. text("" + yardLine, x+10, 325);
  43. stroke(255);
  44. strokeWeight(3);
  45. line(x-26, 450, x, 300);
  46. yardLine = yardLine+1;
  47. x+=50;
  48. }
  49. }
  50.  
  51. void crowd()
  52. {
  53. noStroke();
  54. int row= 150;
  55. while (row<300)
  56. {
  57. randomNumber=(int)random(1,3);
  58. if (randomNumber ==1)
  59. {
  60. fill((blue),(orange));
  61. }
  62. if(randomNumber==2)
  63. {
  64. fill(orange);
  65. collum=112;
  66. while (collum<700)
  67. {
  68. fill(blue);
  69. ellipse(collum, row, 18, 18);
  70. collum+=30;
  71. }
  72. row+=30;
  73. }
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement