Skip to content

Commit e898be6

Browse files
Updated Changes
1 parent efe1955 commit e898be6

18 files changed

+11
-11
lines changed

Diff for: PyGamesScripts/Fruit Ninja Game/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ On the game screen in the top left corner you could see your scrore and on the t
2020

2121
First Screen 🍉💥
2222

23-
![Fruit Ninja Game](Images/FirstScreen.png)
23+
![Fruit Ninja Game](Media/FirstScreen.png)
2424

2525
Game Screen 🍉💥❌
2626

27-
![Fruit Ninja Game](Images/GameScreen.png)
27+
![Fruit Ninja Game](Media/GameScreen.png)
2828

2929
Game Over Screen ❌💥
3030

31-
![Fruit Ninja Game](Images/GameOverScreen.png)
31+
![Fruit Ninja Game](Media/GameOverScreen.png)
3232

3333
Functioning
3434

35-
![Fruit Ninja Game](Images/Functioning.mp4)
35+
![Fruit Ninja Game](Media/Functioning.mp4)
3636

3737

3838
## AUTHOR:

Diff for: PyGamesScripts/Fruit Ninja Game/fruit_ninja.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
GREEN = (0,255,0)
2323
BLUE = (0,0,255)
2424

25-
background = pygame.image.load('Images/background.png') #game background
25+
background = pygame.image.load('Media/background.png') #game background
2626
font = pygame.font.Font(os.path.join(os.getcwd(),'fontdesign.ttf'),42) #font of game display
2727
score_text = font.render('Score : '+str(score),True,(255,255,255)) #score display
2828

2929
# Generalized structure of the fruit Dictionary
3030
def generate_random_fruits(fruit):
31-
fruit_path="Images/"+fruit +".png"
31+
fruit_path="Media/"+fruit +".png"
3232
# 'x' determines where the fruit should be positioned on x-coordinate
3333
# 'speed_x' determines how fast the fruit should move in x direction.Controls the diagonal movement of fruits
3434
# 'speed_y' controls the speed of fruits in y-direction (UPWARD)
@@ -51,7 +51,7 @@ def generate_random_fruits(fruit):
5151
generate_random_fruits(fruit)
5252

5353
def hide_cross_lives(x, y):
54-
gameDisplay.blit(pygame.image.load("Images/red_lives.png"), (x, y))
54+
gameDisplay.blit(pygame.image.load("Media/red_lives.png"), (x, y))
5555

5656
# Generic method to draw fonts on the screen
5757
font_name = pygame.font.match_font('fontdesign.ttf')
@@ -102,7 +102,7 @@ def show_gameover_screen():
102102
first_round = False
103103
game_over = False
104104
player_lives = 3
105-
draw_lives(gameDisplay, 690, 5, player_lives, 'Images/red_lives.png')
105+
draw_lives(gameDisplay, 690, 5, player_lives, 'Media/red_lives.png')
106106
score = 0
107107

108108
for event in pygame.event.get():
@@ -112,7 +112,7 @@ def show_gameover_screen():
112112

113113
gameDisplay.blit(background, (0, 0))
114114
gameDisplay.blit(score_text, (0, 0))
115-
draw_lives(gameDisplay, 690, 5, player_lives,'Images/red_lives.png')
115+
draw_lives(gameDisplay, 690, 5, player_lives,'Media/red_lives.png')
116116

117117
for key, value in data.items():
118118
if value['throw']:
@@ -144,9 +144,9 @@ def show_gameover_screen():
144144
show_gameover_screen()
145145
game_over = True
146146

147-
half_fruit_path = "Images/explosion.png"
147+
half_fruit_path = "Media/explosion.png"
148148
else:
149-
half_fruit_path = "Images/" + "half_" + key + ".png"
149+
half_fruit_path = "Media/" + "half_" + key + ".png"
150150

151151
value['img'] = pygame.image.load(half_fruit_path)
152152
value['speed_x'] += 10

0 commit comments

Comments
 (0)