Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
23e4c7d
Fixed png error
NataliaJauregui Apr 22, 2023
bf71c44
added a function to the draw_cloud
NataliaJauregui Apr 25, 2023
7e1909d
Update README.md
gxxxid Apr 25, 2023
8d93ce3
Update graphics_v4.py
NataliaJauregui Apr 25, 2023
f50f3d0
Add files via upload
gxxxid Apr 25, 2023
a8aa890
Add files via upload
gxxxid Apr 25, 2023
b88f94a
updates to draw_cloud
NataliaJauregui Apr 25, 2023
48de985
Update README.md
gxxxid Apr 25, 2023
4a244aa
Update README.md
gxxxid Apr 25, 2023
8dc5904
simplified star and cloud
NataliaJauregui Apr 25, 2023
3f370d1
update current changes
NataliaJauregui Apr 25, 2023
f786c0a
added member
NataliaJauregui Apr 25, 2023
0367317
added the location of project
NataliaJauregui Apr 25, 2023
dbd2a99
Update README.md
gxxxid Apr 25, 2023
b6f9803
Update README.md
gxxxid Apr 25, 2023
92329b0
Update README.md
gxxxid Apr 25, 2023
8d6d2e3
Delete README.md
NataliaJauregui Apr 25, 2023
0404d9b
Delete JSON directory
NataliaJauregui Apr 25, 2023
6eac20c
Add files via upload
gxxxid Apr 25, 2023
e86f692
updated little parts of program
NataliaJauregui Apr 25, 2023
4c46c6b
made lights and shades/color loops simplier
NataliaJauregui Apr 25, 2023
9e7f156
function for fence
NataliaJauregui Apr 25, 2023
414c32d
updated and found clouds
NataliaJauregui Apr 25, 2023
377dbe0
added comments
NataliaJauregui Apr 25, 2023
cecd40b
more documentation
NataliaJauregui Apr 25, 2023
b1330fb
Update README.md
NataliaJauregui Apr 25, 2023
405db10
added bold and indentation for uniformity
NataliaJauregui Apr 25, 2023
ff8a3dd
added more comments
gxxxid Apr 25, 2023
6153c42
add space between commas
gxxxid Apr 25, 2023
f5a23d4
more comment
gxxxid Apr 25, 2023
09549d3
added usernames
NataliaJauregui Apr 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
408 changes: 194 additions & 214 deletions Intro to Pygame Graphics/major league soccer animation/graphics_v4.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion JSON/data1.json

This file was deleted.

20 changes: 0 additions & 20 deletions JSON/data2.json

This file was deleted.

32 changes: 0 additions & 32 deletions JSON/data3.json

This file was deleted.

118 changes: 0 additions & 118 deletions JSON/json_demo.py

This file was deleted.

49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
# stuff
# CS2520 Assignment 6
Project is located under ---->>>>> Intro to Pygame Graphics > major league soccer animation > graphics_v4.py

__def generate_stars_and_clouds():__
This code uses list comprehension to create the stars and clouds lists in a more concise way. It also eliminates the need for temporary variables x, y, and r.

__def draw_cloud(x, y):__
This code stores the ellipse coordinates and dimensions in a list and then iterates over the list to draw each ellipse using a loop. This reduces the number of lines of code from 5 to 2.

__def get_colors(day):__
This code defines a function called "get_colors" that takes a parameter "day". Inside the function, it checks if the "day" parameter is truthy (i.e., evaluates to True in a boolean context), and if so, it sets four variables "sky_color", "field_color", "stripe_color", and "cloud_color" to the values of "BLUE", "GREEN", "DAY_GREEN", and "WHITE", respectively. Otherwise, it sets these variables to the values of "DARK_BLUE", "DARK_GREEN", "NIGHT_GREEN", and "NIGHT_GRAY", respectively.
The function then returns a tuple containing these four color values. Finally, the code assigns the values returned by the function to four variables "sky_color", "field_color", "stripe_color", and "cloud_color" using tuple unpacking.

__def draw_field_and_stripes(screen, field_color, stripe_color):__
This code defines a function called "draw_field_and_stripes" that takes three parameters: "screen", "field_color", and "stripe_color". The function uses the Pygame library to draw a series of rectangles on the "screen" object that represent a field with stripes.

__def draw_fence(screen, color):__
This code defines a function that draws a fence on a Pygame screen using polygons and lines. The function takes in two parameters: the screen to draw on and the color of the fence. The first loop draws rectangular polygons for the fence, while the second loop draws vertical lines. The third loop draws horizontal lines to complete the fence.

__def draw_sun_or_moon(screen, day, sky_color):__
This code defines a function called "draw_sun_or_moon" that takes three parameters: "screen", "day", and "sky_color". The function uses the Pygame library to draw a sun or moon on the "screen" object depending on the value of the "day" parameter. If day is true then it returns a sun, if it is false it returns a moon.

__goal(length,height,color):__
draws a goal net based on its length, height, and color

__draw_line_goal_box(color):__
draws the line in front of the goal net based on the provided color

__draw_light(x_index):__
draws the light of the court based on the provided x index


__draw_stand(front_color,back_color):__
draws the left and right viewer stands based on the provided color

__draw_left_flag(stick_color, flag_color, x, y):__
draws a small flag t that tilted left based on x and y index and its color

__draw_right_flag(stick_color, flag_color, x, y):__
draws a small flag t that tilted right based on x and y index and its color





Members:
Natalia Jauregui (chocolatecheerios)
Haosi Lin (gxxxid)
File renamed without changes
File renamed without changes