Skip to content

Commit

Permalink
(hopefully) fix cell duplication bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LBlend committed Nov 28, 2023
1 parent 1faf8be commit 226f7f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cogs/cs2_bingo.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ async def sample_cells(cls, players: list[str], bot: commands.Bot) -> dict[str,
player_space = default_space + [i for op in other_players for i in cls.CELLS.get(op, [])]
other_players.append("du")

other_players = [
other_players_names = [
cls.NAMES.get(op, bot.get_user(int(op)).display_name) for op in other_players if op != "du"
]
player_space += [s.format(random.choice(other_players)) for s in cls.CELLS["parameterized"]]
player_space += [s.format(random.choice(other_players_names)) for s in cls.CELLS["parameterized"]]

sampled_cells = np.random.choice(player_space, replace=False, size=25)
player_cells[player] = list(sampled_cells)
Expand Down

0 comments on commit 226f7f7

Please sign in to comment.