Skip to content

Commit f138c06

Browse files
committed
Black formatting changes, because I can't get it right anymore
1 parent 58831b2 commit f138c06

15 files changed

+95
-272
lines changed

arcade-platformer/arcade_platformer/02_open_game_window.py

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

5656
# Load up our sounds here
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-
)
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"))
6359
self.victory_sound = arcade.load_sound(
6460
str(ASSETS_PATH / "sounds" / "victory.wav")
6561
)

arcade-platformer/arcade_platformer/03_read_level_one.py

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

6464
# Load up our sounds here
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-
)
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"))
7167
self.victory_sound = arcade.load_sound(
7268
str(ASSETS_PATH / "sounds" / "victory.wav")
7369
)

arcade-platformer/arcade_platformer/04_define_player.py

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

6464
# Load up our sounds here
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-
)
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"))
7167
self.victory_sound = arcade.load_sound(
7268
str(ASSETS_PATH / "sounds" / "victory.wav")
7369
)
@@ -140,21 +136,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
140136
texture_path = ASSETS_PATH / "images" / "player"
141137

142138
# Setup the appropriate textures
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-
]
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)]
149141
standing_path = texture_path / "alienGreen_stand.png"
150142

151143
# Load them all now
152144
walking_right_textures = [
153145
arcade.load_texture(texture) for texture in walking_paths
154146
]
155147
walking_left_textures = [
156-
arcade.load_texture(texture, mirrored=True)
157-
for texture in walking_paths
148+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
158149
]
159150

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

167158
standing_right_textures = [arcade.load_texture(standing_path)]
168159

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

173162
# Create the sprite
174163
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/05_update_and_draw.py

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

6464
# Load up our sounds here
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-
)
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"))
7167
self.victory_sound = arcade.load_sound(
7268
str(ASSETS_PATH / "sounds" / "victory.wav")
7369
)
@@ -140,21 +136,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
140136
texture_path = ASSETS_PATH / "images" / "player"
141137

142138
# Setup the appropriate textures
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-
]
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)]
149141
standing_path = texture_path / "alienGreen_stand.png"
150142

151143
# Load them all now
152144
walking_right_textures = [
153145
arcade.load_texture(texture) for texture in walking_paths
154146
]
155147
walking_left_textures = [
156-
arcade.load_texture(texture, mirrored=True)
157-
for texture in walking_paths
148+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
158149
]
159150

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

167158
standing_right_textures = [arcade.load_texture(standing_path)]
168159

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

173162
# Create the sprite
174163
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/06_keyboard_movement.py

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

6666
# Load up our sounds here
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-
)
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"))
7369
self.victory_sound = arcade.load_sound(
7470
str(ASSETS_PATH / "sounds" / "victory.wav")
7571
)
@@ -142,21 +138,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
142138
texture_path = ASSETS_PATH / "images" / "player"
143139

144140
# Setup the appropriate textures
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-
]
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)]
151143
standing_path = texture_path / "alienGreen_stand.png"
152144

153145
# Load them all now
154146
walking_right_textures = [
155147
arcade.load_texture(texture) for texture in walking_paths
156148
]
157149
walking_left_textures = [
158-
arcade.load_texture(texture, mirrored=True)
159-
for texture in walking_paths
150+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
160151
]
161152

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

169160
standing_right_textures = [arcade.load_texture(standing_path)]
170161

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

175164
# Create the sprite
176165
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/07_scrolling_view.py

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

7373
# Load up our sounds here
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-
)
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"))
8076
self.victory_sound = arcade.load_sound(
8177
str(ASSETS_PATH / "sounds" / "victory.wav")
8278
)
@@ -156,21 +152,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
156152
texture_path = ASSETS_PATH / "images" / "player"
157153

158154
# Setup the appropriate textures
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-
]
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)]
165157
standing_path = texture_path / "alienGreen_stand.png"
166158

167159
# Load them all now
168160
walking_right_textures = [
169161
arcade.load_texture(texture) for texture in walking_paths
170162
]
171163
walking_left_textures = [
172-
arcade.load_texture(texture, mirrored=True)
173-
for texture in walking_paths
164+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
174165
]
175166

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

183174
standing_right_textures = [arcade.load_texture(standing_path)]
184175

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

189178
# Create the sprite
190179
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/08_on_screen_score.py

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

7373
# Load up our sounds here
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-
)
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"))
8076
self.victory_sound = arcade.load_sound(
8177
str(ASSETS_PATH / "sounds" / "victory.wav")
8278
)
@@ -156,21 +152,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
156152
texture_path = ASSETS_PATH / "images" / "player"
157153

158154
# Setup the appropriate textures
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-
]
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)]
165157
standing_path = texture_path / "alienGreen_stand.png"
166158

167159
# Load them all now
168160
walking_right_textures = [
169161
arcade.load_texture(texture) for texture in walking_paths
170162
]
171163
walking_left_textures = [
172-
arcade.load_texture(texture, mirrored=True)
173-
for texture in walking_paths
164+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
174165
]
175166

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

183174
standing_right_textures = [arcade.load_texture(standing_path)]
184175

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

189178
# Create the sprite
190179
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/09_joystick_control.py

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

7676
# Load up our sounds here
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-
)
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"))
8379
self.victory_sound = arcade.load_sound(
8480
str(ASSETS_PATH / "sounds" / "victory.wav")
8581
)
@@ -171,21 +167,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
171167
texture_path = ASSETS_PATH / "images" / "player"
172168

173169
# Setup the appropriate textures
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-
]
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)]
180172
standing_path = texture_path / "alienGreen_stand.png"
181173

182174
# Load them all now
183175
walking_right_textures = [
184176
arcade.load_texture(texture) for texture in walking_paths
185177
]
186178
walking_left_textures = [
187-
arcade.load_texture(texture, mirrored=True)
188-
for texture in walking_paths
179+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
189180
]
190181

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

198189
standing_right_textures = [arcade.load_texture(standing_path)]
199190

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

204193
# Create the sprite
205194
player = arcade.AnimatedWalkingSprite()

arcade-platformer/arcade_platformer/10_view_conversion.py

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

7676
# Load up our sounds here
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-
)
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"))
8379
self.victory_sound = arcade.load_sound(
8480
str(ASSETS_PATH / "sounds" / "victory.wav")
8581
)
@@ -171,21 +167,16 @@ def create_player_sprite(self) -> arcade.AnimatedWalkingSprite:
171167
texture_path = ASSETS_PATH / "images" / "player"
172168

173169
# Setup the appropriate textures
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-
]
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)]
180172
standing_path = texture_path / "alienGreen_stand.png"
181173

182174
# Load them all now
183175
walking_right_textures = [
184176
arcade.load_texture(texture) for texture in walking_paths
185177
]
186178
walking_left_textures = [
187-
arcade.load_texture(texture, mirrored=True)
188-
for texture in walking_paths
179+
arcade.load_texture(texture, mirrored=True) for texture in walking_paths
189180
]
190181

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

198189
standing_right_textures = [arcade.load_texture(standing_path)]
199190

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

204193
# Create the sprite
205194
player = arcade.AnimatedWalkingSprite()

0 commit comments

Comments
 (0)