@@ -78,7 +78,7 @@ def blankScreen(disp, pix):
78
78
if disp is None :
79
79
return
80
80
81
- disp .show (Group (max_size = 1 ))
81
+ disp .show (Group ())
82
82
83
83
84
84
class RPSDisplay ():
@@ -235,7 +235,7 @@ def showChoice(self,
235
235
236
236
self .emptyGroup (self .disp_group )
237
237
# Would be slightly better to create this Group once and re-use it
238
- round_choice_group = Group (max_size = 3 )
238
+ round_choice_group = Group ()
239
239
240
240
if round_no is not None :
241
241
title_dob = Label (self .font ,
@@ -261,7 +261,7 @@ def showChoice(self,
261
261
gamesum_dob .y = round (self .height - 2 * self .font_height // 2 )
262
262
round_choice_group .append (gamesum_dob )
263
263
264
- s_group = Group (scale = 3 , max_size = 1 )
264
+ s_group = Group (scale = 3 )
265
265
s_group .x = 32
266
266
s_group .y = (self .height - 3 * self .sprite_size ) // 2
267
267
s_group .append (self .sprites [ch_idx ])
@@ -275,7 +275,7 @@ def introductionScreen(self):
275
275
"""Introduction screen."""
276
276
if self .disp is not None :
277
277
self .emptyGroup (self .disp_group )
278
- intro_group = Group (max_size = 7 )
278
+ intro_group = Group ()
279
279
welcometo_dob = Label (self .font ,
280
280
text = "Welcome To" ,
281
281
scale = 3 ,
@@ -289,7 +289,7 @@ def introductionScreen(self):
289
289
spacing = 3 * self .sprite_size + extra_space
290
290
y_adj = (- 6 , - 2 , - 2 )
291
291
for idx , sprite in enumerate (self .sprites ):
292
- s_group = Group (scale = 3 , max_size = 1 )
292
+ s_group = Group (scale = 3 )
293
293
s_group .x = - 96
294
294
s_group .y = round ((self .height - 1.5 * self .sprite_size ) / 2
295
295
+ (idx - 1 ) * spacing ) + y_adj [idx ]
@@ -384,7 +384,7 @@ def playerListScreen(self):
384
384
385
385
self .emptyGroup (self .disp_group )
386
386
# The two multiplier allows for rssi as separate label
387
- playerlist_group = Group (max_size = self . max_players * 2 )
387
+ playerlist_group = Group ()
388
388
self .showGroup (playerlist_group )
389
389
390
390
@@ -460,7 +460,7 @@ def showGameResultScreen(self, pla, sco, rounds_tot=None):
460
460
self .emptyGroup (self .disp_group )
461
461
462
462
# Score list group + background + question mark for sorting
463
- gs_group = Group (max_size = 4 )
463
+ gs_group = Group ()
464
464
465
465
# Pale grey large GAME SCORES background
466
466
bg_scale = 6
@@ -500,7 +500,7 @@ def showGameResultScreen(self, pla, sco, rounds_tot=None):
500
500
- len (pla ) * scale * self .font_height
501
501
- (len (pla ) - 1 ) * spacing ) / 2
502
502
+ scale * self .font_height / 2 )
503
- scores_group = Group (max_size = len ( pla ) )
503
+ scores_group = Group ()
504
504
gs_group .append (scores_group )
505
505
for idx , (name , _ ) in enumerate (pla ):
506
506
op_dob = Label (self .font ,
@@ -648,7 +648,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,
648
648
649
649
if void :
650
650
error_tot = 3
651
- error_group = Group (max_size = error_tot + 1 )
651
+ error_group = Group ()
652
652
# Opponent's name helps pinpoint the error
653
653
op_dob = Label (self .font ,
654
654
text = op_name ,
@@ -677,7 +677,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,
677
677
678
678
else :
679
679
# Would be slightly better to create this Group once and re-use it
680
- pvp_group = Group (max_size = 3 )
680
+ pvp_group = Group ()
681
681
682
682
# Add player's name and sprite just off left side of screen
683
683
# and opponent's just off right
@@ -696,7 +696,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,
696
696
for (name , sprite ,
697
697
start_x ,
698
698
fg , bg ) in player_detail :
699
- s_group = Group (scale = 2 , max_size = 2 ) # Audio is choppy at scale=3
699
+ s_group = Group (scale = 2 ) # Audio is choppy at scale=3
700
700
s_group .x = start_x
701
701
s_group .y = (self .height - 2 * (self .sprite_size + self .font_height )) // 2
702
702
0 commit comments