fix a few missing self attributes

This commit is contained in:
Maximilian Keßler 2023-03-18 10:17:09 +01:00
parent a90423e5c4
commit a056c83869
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -194,7 +194,7 @@ class GameState():
self.actions.append(Action(ActionType.Discard, target=card_idx))
self.clues += 1
self.pace -= 1
self.trash.append(instance.deck[card_idx])
self.trash.append(self.instance.deck[card_idx])
self.__replace(card_idx)
self.__make_turn()
@ -211,6 +211,29 @@ class GameState():
self.__make_turn()
# Forward some properties of the underlying instance
@property
def num_players(self):
return self.instance.num_players
@property
def num_suits(self):
return self.instance.num_suits
@property
def num_dark_suits(self):
return self.instance.num_dark_suits
@property
def deck(self):
return self.instance.deck
@property
def hand_size(self):
return self.instance.hand_size
# Properties of GameState
def is_over(self):
@ -248,8 +271,8 @@ class GameState():
)
)
return {
"deck": instance.deck,
"players": instance.players,
"deck": self.instance.deck,
"players": self.instance.player_names,
"actions": self.actions,
"first_player": 0,
"options": {