Fix card transparency issues
parent
5e3388181f
commit
fcb2fa5ded
2
cards.py
2
cards.py
|
@ -178,7 +178,7 @@ class Deck():
|
||||||
self.update_deck_display()
|
self.update_deck_display()
|
||||||
|
|
||||||
def update_deck_display(self):
|
def update_deck_display(self):
|
||||||
self.deck_surface.fill((0, 0, 0, 0))
|
self.background.fill((0, 255, 0))
|
||||||
self.deck_surface.blit(self.background, (0, 0))
|
self.deck_surface.blit(self.background, (0, 0))
|
||||||
if not self.is_empty():
|
if not self.is_empty():
|
||||||
if self.draw_from_last:
|
if self.draw_from_last:
|
||||||
|
|
|
@ -138,6 +138,7 @@ class Table:
|
||||||
|
|
||||||
self.player_stats = [[], [], [], []]
|
self.player_stats = [[], [], [], []]
|
||||||
|
|
||||||
|
# TODO: change surface to use colorkey
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
vert = i % 2 == 1
|
vert = i % 2 == 1
|
||||||
self.players.append(Player(playerx[i], playery[i],
|
self.players.append(Player(playerx[i], playery[i],
|
||||||
|
@ -279,7 +280,7 @@ class Table:
|
||||||
|
|
||||||
elif self.game_state == GameState.POINT_CHECK:
|
elif self.game_state == GameState.POINT_CHECK:
|
||||||
if self.check_reshuffle():
|
if self.check_reshuffle():
|
||||||
self.write_message('Reshuffle Initiated!')
|
self.write_message('Reshuffle Initiated!', line=1)
|
||||||
self.game_state = GameState.ENDING
|
self.game_state = GameState.ENDING
|
||||||
else:
|
else:
|
||||||
self.write_message('No Reshuffle needed!')
|
self.write_message('No Reshuffle needed!')
|
||||||
|
@ -325,7 +326,7 @@ class Table:
|
||||||
for i, player in enumerate(self.players):
|
for i, player in enumerate(self.players):
|
||||||
print("Player {0:d}: {1:d}".format(i, player.get_card_points()))
|
print("Player {0:d}: {1:d}".format(i, player.get_card_points()))
|
||||||
if player.get_card_points() < 4:
|
if player.get_card_points() < 4:
|
||||||
print("Player: {0:d}".format(i))
|
self.write_message("Low points detected in Player {0:d}! ".format(i))
|
||||||
return player.make_decision(self.game_state, 0)
|
return player.make_decision(self.game_state, 0)
|
||||||
|
|
||||||
def start_bidding(self):
|
def start_bidding(self):
|
||||||
|
@ -544,7 +545,7 @@ class Player(cards.Deck):
|
||||||
if game_state == GameState.POINT_CHECK:
|
if game_state == GameState.POINT_CHECK:
|
||||||
if self.AI:
|
if self.AI:
|
||||||
return self.AI.request_reshuffle()
|
return self.AI.request_reshuffle()
|
||||||
if input("Low points hand detected! Reshuffle?").lower() == 'y':
|
if input("Reshuffle? (y/n)").lower() == 'y':
|
||||||
return self.request_reshuffle()
|
return self.request_reshuffle()
|
||||||
if game_state == GameState.BIDDING:
|
if game_state == GameState.BIDDING:
|
||||||
if sub_state == 0:
|
if sub_state == 0:
|
||||||
|
|
Loading…
Reference in New Issue