Skip to content

Commit 227ca08

Browse files
committed
More formatting
1 parent f138c06 commit 227ca08

15 files changed

+272
-95
lines changed

arcade-platformer/arcade_platformer/02_open_game_window.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ def __init__(self) -> None:
5454
self.level = 1
5555

5656
# Load up our sounds here
57-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
58-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
57+
self.coin_sound = arcade.load_sound(
58+
str(ASSETS_PATH / "sounds" / "coin.wav")
59+
)
60+
self.jump_sound = arcade.load_sound(
61+
str(ASSETS_PATH / "sounds" / "jump.wav")
62+
)
5963
self.victory_sound = arcade.load_sound(
6064
str(ASSETS_PATH / "sounds" / "victory.wav")
6165
)

arcade-platformer/arcade_platformer/03_read_level_one.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ def __init__(self) -> None:
6262
self.level = 1
6363

6464
# Load up our sounds here
65-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
66-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
65+
self.coin_sound = arcade.load_sound(
66+
str(ASSETS_PATH / "sounds" / "coin.wav")
67+
)
68+
self.jump_sound = arcade.load_sound(
69+
str(ASSETS_PATH / "sounds" / "jump.wav")
70+
)
6771
self.victory_sound = arcade.load_sound(
6872
str(ASSETS_PATH / "sounds" / "victory.wav")
6973
)

arcade-platformer/arcade_platformer/04_define_player.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ def __init__(self) -> None:
6262
self.level = 1
6363

6464
# Load up our sounds here
65-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
66-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
65+
self.coin_sound = arcade.load_sound(
66+
str(ASSETS_PATH / "sounds" / "coin.wav")
67+
)
68+
self.jump_sound = arcade.load_sound(
69+
str(ASSETS_PATH / "sounds" / "jump.wav")
70+
)
6771
self.victory_sound = arcade.load_sound(
6872
str(ASSETS_PATH / "sounds" / "victory.wav")
6973
)
@@ -136,16 +140,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
136140
texture_path = ASSETS_PATH / "images" / "player"
137141

138142
# Setup the appropriate textures
139-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
140-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
143+
walking_paths = [
144+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
145+
]
146+
climbing_paths = [
147+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
148+
]
141149
standing_path = texture_path / "alienGreen_stand.png"
142150

143151
# Load them all now
144152
walking_right_textures = [
145153
arcade.load_texture(texture) for texture in walking_paths
146154
]
147155
walking_left_textures = [
148-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
156+
arcade.load_texture(texture, mirrored=True)
157+
for texture in walking_paths
149158
]
150159

151160
walking_up_textures = [
@@ -157,7 +166,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
157166

158167
standing_right_textures = [arcade.load_texture(standing_path)]
159168

160-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
169+
standing_left_textures = [
170+
arcade.load_texture(standing_path, mirrored=True)
171+
]
161172

162173
# Create the sprite
163174
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/05_update_and_draw.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ def __init__(self) -> None:
6262
self.level = 1
6363

6464
# Load up our sounds here
65-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
66-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
65+
self.coin_sound = arcade.load_sound(
66+
str(ASSETS_PATH / "sounds" / "coin.wav")
67+
)
68+
self.jump_sound = arcade.load_sound(
69+
str(ASSETS_PATH / "sounds" / "jump.wav")
70+
)
6771
self.victory_sound = arcade.load_sound(
6872
str(ASSETS_PATH / "sounds" / "victory.wav")
6973
)
@@ -136,16 +140,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
136140
texture_path = ASSETS_PATH / "images" / "player"
137141

138142
# Setup the appropriate textures
139-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
140-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
143+
walking_paths = [
144+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
145+
]
146+
climbing_paths = [
147+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
148+
]
141149
standing_path = texture_path / "alienGreen_stand.png"
142150

143151
# Load them all now
144152
walking_right_textures = [
145153
arcade.load_texture(texture) for texture in walking_paths
146154
]
147155
walking_left_textures = [
148-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
156+
arcade.load_texture(texture, mirrored=True)
157+
for texture in walking_paths
149158
]
150159

151160
walking_up_textures = [
@@ -157,7 +166,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
157166

158167
standing_right_textures = [arcade.load_texture(standing_path)]
159168

160-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
169+
standing_left_textures = [
170+
arcade.load_texture(standing_path, mirrored=True)
171+
]
161172

162173
# Create the sprite
163174
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/06_keyboard_movement.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ def __init__(self) -> None:
6464
self.level = 1
6565

6666
# Load up our sounds here
67-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
68-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
67+
self.coin_sound = arcade.load_sound(
68+
str(ASSETS_PATH / "sounds" / "coin.wav")
69+
)
70+
self.jump_sound = arcade.load_sound(
71+
str(ASSETS_PATH / "sounds" / "jump.wav")
72+
)
6973
self.victory_sound = arcade.load_sound(
7074
str(ASSETS_PATH / "sounds" / "victory.wav")
7175
)
@@ -138,16 +142,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
138142
texture_path = ASSETS_PATH / "images" / "player"
139143

140144
# Setup the appropriate textures
141-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
142-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
145+
walking_paths = [
146+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
147+
]
148+
climbing_paths = [
149+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
150+
]
143151
standing_path = texture_path / "alienGreen_stand.png"
144152

145153
# Load them all now
146154
walking_right_textures = [
147155
arcade.load_texture(texture) for texture in walking_paths
148156
]
149157
walking_left_textures = [
150-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
158+
arcade.load_texture(texture, mirrored=True)
159+
for texture in walking_paths
151160
]
152161

153162
walking_up_textures = [
@@ -159,7 +168,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
159168

160169
standing_right_textures = [arcade.load_texture(standing_path)]
161170

162-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
171+
standing_left_textures = [
172+
arcade.load_texture(standing_path, mirrored=True)
173+
]
163174

164175
# Create the sprite
165176
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/07_scrolling_view.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@ def __init__(self) -> None:
7171
self.level = 1
7272

7373
# Load up our sounds here
74-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
75-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
74+
self.coin_sound = arcade.load_sound(
75+
str(ASSETS_PATH / "sounds" / "coin.wav")
76+
)
77+
self.jump_sound = arcade.load_sound(
78+
str(ASSETS_PATH / "sounds" / "jump.wav")
79+
)
7680
self.victory_sound = arcade.load_sound(
7781
str(ASSETS_PATH / "sounds" / "victory.wav")
7882
)
@@ -152,16 +156,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
152156
texture_path = ASSETS_PATH / "images" / "player"
153157

154158
# Setup the appropriate textures
155-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
156-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
159+
walking_paths = [
160+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
161+
]
162+
climbing_paths = [
163+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
164+
]
157165
standing_path = texture_path / "alienGreen_stand.png"
158166

159167
# Load them all now
160168
walking_right_textures = [
161169
arcade.load_texture(texture) for texture in walking_paths
162170
]
163171
walking_left_textures = [
164-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
172+
arcade.load_texture(texture, mirrored=True)
173+
for texture in walking_paths
165174
]
166175

167176
walking_up_textures = [
@@ -173,7 +182,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
173182

174183
standing_right_textures = [arcade.load_texture(standing_path)]
175184

176-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
185+
standing_left_textures = [
186+
arcade.load_texture(standing_path, mirrored=True)
187+
]
177188

178189
# Create the sprite
179190
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/08_on_screen_score.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@ def __init__(self) -> None:
7171
self.level = 1
7272

7373
# Load up our sounds here
74-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
75-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
74+
self.coin_sound = arcade.load_sound(
75+
str(ASSETS_PATH / "sounds" / "coin.wav")
76+
)
77+
self.jump_sound = arcade.load_sound(
78+
str(ASSETS_PATH / "sounds" / "jump.wav")
79+
)
7680
self.victory_sound = arcade.load_sound(
7781
str(ASSETS_PATH / "sounds" / "victory.wav")
7882
)
@@ -152,16 +156,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
152156
texture_path = ASSETS_PATH / "images" / "player"
153157

154158
# Setup the appropriate textures
155-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
156-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
159+
walking_paths = [
160+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
161+
]
162+
climbing_paths = [
163+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
164+
]
157165
standing_path = texture_path / "alienGreen_stand.png"
158166

159167
# Load them all now
160168
walking_right_textures = [
161169
arcade.load_texture(texture) for texture in walking_paths
162170
]
163171
walking_left_textures = [
164-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
172+
arcade.load_texture(texture, mirrored=True)
173+
for texture in walking_paths
165174
]
166175

167176
walking_up_textures = [
@@ -173,7 +182,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
173182

174183
standing_right_textures = [arcade.load_texture(standing_path)]
175184

176-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
185+
standing_left_textures = [
186+
arcade.load_texture(standing_path, mirrored=True)
187+
]
177188

178189
# Create the sprite
179190
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/09_joystick_control.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ def __init__(self) -> None:
7474
self.level = 1
7575

7676
# Load up our sounds here
77-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
78-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
77+
self.coin_sound = arcade.load_sound(
78+
str(ASSETS_PATH / "sounds" / "coin.wav")
79+
)
80+
self.jump_sound = arcade.load_sound(
81+
str(ASSETS_PATH / "sounds" / "jump.wav")
82+
)
7983
self.victory_sound = arcade.load_sound(
8084
str(ASSETS_PATH / "sounds" / "victory.wav")
8185
)
@@ -167,16 +171,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
167171
texture_path = ASSETS_PATH / "images" / "player"
168172

169173
# Setup the appropriate textures
170-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
171-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
174+
walking_paths = [
175+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
176+
]
177+
climbing_paths = [
178+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
179+
]
172180
standing_path = texture_path / "alienGreen_stand.png"
173181

174182
# Load them all now
175183
walking_right_textures = [
176184
arcade.load_texture(texture) for texture in walking_paths
177185
]
178186
walking_left_textures = [
179-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
187+
arcade.load_texture(texture, mirrored=True)
188+
for texture in walking_paths
180189
]
181190

182191
walking_up_textures = [
@@ -188,7 +197,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
188197

189198
standing_right_textures = [arcade.load_texture(standing_path)]
190199

191-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
200+
standing_left_textures = [
201+
arcade.load_texture(standing_path, mirrored=True)
202+
]
192203

193204
# Create the sprite
194205
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/10_view_conversion.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ def __init__(self) -> None:
7474
self.level = 1
7575

7676
# Load up our sounds here
77-
self.coin_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "coin.wav"))
78-
self.jump_sound = arcade.load_sound(str(ASSETS_PATH / "sounds" / "jump.wav"))
77+
self.coin_sound = arcade.load_sound(
78+
str(ASSETS_PATH / "sounds" / "coin.wav")
79+
)
80+
self.jump_sound = arcade.load_sound(
81+
str(ASSETS_PATH / "sounds" / "jump.wav")
82+
)
7983
self.victory_sound = arcade.load_sound(
8084
str(ASSETS_PATH / "sounds" / "victory.wav")
8185
)
@@ -167,16 +171,21 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
167171
texture_path = ASSETS_PATH / "images" / "player"
168172

169173
# Setup the appropriate textures
170-
walking_paths = [texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)]
171-
climbing_paths = [texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)]
174+
walking_paths = [
175+
texture_path / f"alienGreen_walk{x}.png" for x in (1, 2)
176+
]
177+
climbing_paths = [
178+
texture_path / f"alienGreen_climb{x}.png" for x in (1, 2)
179+
]
172180
standing_path = texture_path / "alienGreen_stand.png"
173181

174182
# Load them all now
175183
walking_right_textures = [
176184
arcade.load_texture(texture) for texture in walking_paths
177185
]
178186
walking_left_textures = [
179-
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
187+
arcade.load_texture(texture, mirrored=True)
188+
for texture in walking_paths
180189
]
181190

182191
walking_up_textures = [
@@ -188,7 +197,9 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
188197

189198
standing_right_textures = [arcade.load_texture(standing_path)]
190199

191-
standing_left_textures = [arcade.load_texture(standing_path, mirrored=True)]
200+
standing_left_textures = [
201+
arcade.load_texture(standing_path, mirrored=True)
202+
]
192203

193204
# Create the sprite
194205
player = arcade.AnimatedWalkingSprite()

0 commit comments

Comments
 (0)