Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 11 additions & 11 deletions CLUE_Rock_Paper_Scissors/advanced/rps_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def blankScreen(disp, pix):
if disp is None:
return

disp.show(Group(max_size=1))
disp.show(Group())


class RPSDisplay():
Expand Down Expand Up @@ -235,7 +235,7 @@ def showChoice(self,

self.emptyGroup(self.disp_group)
# Would be slightly better to create this Group once and re-use it
round_choice_group = Group(max_size=3)
round_choice_group = Group()

if round_no is not None:
title_dob = Label(self.font,
Expand All @@ -261,7 +261,7 @@ def showChoice(self,
gamesum_dob.y = round(self.height - 2 * self.font_height // 2)
round_choice_group.append(gamesum_dob)

s_group = Group(scale=3, max_size=1)
s_group = Group(scale=3)
s_group.x = 32
s_group.y = (self.height - 3 * self.sprite_size) // 2
s_group.append(self.sprites[ch_idx])
Expand All @@ -275,7 +275,7 @@ def introductionScreen(self):
"""Introduction screen."""
if self.disp is not None:
self.emptyGroup(self.disp_group)
intro_group = Group(max_size=7)
intro_group = Group()
welcometo_dob = Label(self.font,
text="Welcome To",
scale=3,
Expand All @@ -289,7 +289,7 @@ def introductionScreen(self):
spacing = 3 * self.sprite_size + extra_space
y_adj = (-6, -2, -2)
for idx, sprite in enumerate(self.sprites):
s_group = Group(scale=3, max_size=1)
s_group = Group(scale=3)
s_group.x = -96
s_group.y = round((self.height - 1.5 * self.sprite_size) / 2
+ (idx - 1) * spacing) + y_adj[idx]
Expand Down Expand Up @@ -384,7 +384,7 @@ def playerListScreen(self):

self.emptyGroup(self.disp_group)
# The two multiplier allows for rssi as separate label
playerlist_group = Group(max_size=self.max_players * 2)
playerlist_group = Group()
self.showGroup(playerlist_group)


Expand Down Expand Up @@ -460,7 +460,7 @@ def showGameResultScreen(self, pla, sco, rounds_tot=None):
self.emptyGroup(self.disp_group)

# Score list group + background + question mark for sorting
gs_group = Group(max_size=4)
gs_group = Group()

# Pale grey large GAME SCORES background
bg_scale = 6
Expand Down Expand Up @@ -500,7 +500,7 @@ def showGameResultScreen(self, pla, sco, rounds_tot=None):
- len(pla) * scale * self.font_height
- (len(pla) - 1) * spacing) / 2
+ scale * self.font_height / 2)
scores_group = Group(max_size=len(pla))
scores_group = Group()
gs_group.append(scores_group)
for idx, (name, _) in enumerate(pla):
op_dob = Label(self.font,
Expand Down Expand Up @@ -648,7 +648,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,

if void:
error_tot = 3
error_group = Group(max_size=error_tot + 1)
error_group = Group()
# Opponent's name helps pinpoint the error
op_dob = Label(self.font,
text=op_name,
Expand Down Expand Up @@ -677,7 +677,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,

else:
# Would be slightly better to create this Group once and re-use it
pvp_group = Group(max_size=3)
pvp_group = Group()

# Add player's name and sprite just off left side of screen
# and opponent's just off right
Expand All @@ -696,7 +696,7 @@ def showPlayerVPlayerScreen(self, me_name, op_name, my_ch_idx, op_ch_idx,
for (name, sprite,
start_x,
fg, bg) in player_detail:
s_group = Group(scale=2, max_size=2) # Audio is choppy at scale=3
s_group = Group(scale=2) # Audio is choppy at scale=3
s_group.x = start_x
s_group.y = (self.height - 2 * (self.sprite_size + self.font_height)) // 2

Expand Down
2 changes: 1 addition & 1 deletion CLUE_Rock_Paper_Scissors/simple/clue-simple-rpsgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def flashWinner(c_idx, who):

# The 6x14 terminalio classic font
FONT_WIDTH, FONT_HEIGHT = terminalio.FONT.get_bounding_box()
screen_group = Group(max_size=len(choices) * 2 + 1 + 1)
screen_group = Group()

# The position of the two players RPS Label objects inside screen_group
rps_dob_idx = []
Expand Down