Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bytestorm5 committed Apr 9, 2024
1 parent a0682e4 commit 9be8614
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions buckshot_roulette/ai.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from game import BuckshotRoulette
from buckshot_roulette.game import BuckshotRoulette
from typing import Literal
from dataclasses import asdict
import random

class Dealer:
def __init__(self, playing_as: Literal[0, 1]):
def __init__(self, playing_as: Literal[0, 1]):
self.me = playing_as
self.known_shells: list[bool] = None
self.target = None
self.known_shell = None
Expand Down
6 changes: 3 additions & 3 deletions buckshot_roulette/game.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import random
from dataclasses import dataclass
from dataclasses import dataclass, astuple
import copy

@dataclass(init=True)
Expand Down Expand Up @@ -244,8 +244,8 @@ def __hash__(self):
tuple(self.charges),
self.current_turn,
tuple(self._shotgun),
tuple(tuple(sorted(player.items())) for player in self.items),
tuple(sorted(self._active_items.items())),
tuple(astuple(player) for player in self.items),
astuple(self._active_items),
self._skip_next,
self.chamber_public))
def to_json(self):
Expand Down

0 comments on commit 9be8614

Please sign in to comment.