Make player with AI non-selectable

master
En Yi 2019-06-10 18:54:38 +01:00
parent 64f60514d7
commit 36b0594106
2 changed files with 11 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class Player(cards.Deck):
def add_ai(self, ai_comp):
self.AI = ai_comp
ai_comp.connect_to_player(self)
self.selectable = False
def make_decision(self, game_state, sub_state):
"""

View File

@ -84,7 +84,7 @@ class Table:
w_deck = min(self.height, self.width) * 0.18
l_deck = min(self.width, self.height) * 0.7
# This is not a deck as it will never be drawn
self.discard_deck = cards.prepare_playing_cards(int(w_deck*0.7), int(w_deck*0.9))
self.discard_deck = cards.prepare_playing_cards(int(w_deck*0.7), int(w_deck*0.8))
game_margins = 5
# Players' deck positioning
@ -510,6 +510,15 @@ class Table:
print(len(self.discard_deck))
self.update_table.emit()
def process_player_input(self, player_input):
# TODO: add processing player input
if player_input[0] == "select":
pass
elif player_input[0] == "play":
pass
pass
class TestView(view.PygView):
def __init__(self, *args, **kwargs):