fix potential bugs

This commit is contained in:
Alberto Xamin 2024-06-10 14:04:06 +01:00
parent 64feee23ae
commit b72319f335
No known key found for this signature in database
GPG Key ID: 5ABFCD8A22EA6F5D
3 changed files with 594 additions and 667 deletions

View File

@ -15,6 +15,8 @@ class StationCard:
def discard_and_buy_train(self, player: "Player", card_index: int): def discard_and_buy_train(self, player: "Player", card_index: int):
"""Discard the card and buy the train""" """Discard the card and buy the train"""
if self.attached_train is None:
return
card = player.available_cards.pop(card_index) card = player.available_cards.pop(card_index)
for i, card in enumerate(player.hand): for i, card in enumerate(player.hand):
if card == self: if card == self:

View File

@ -45,7 +45,7 @@ export default {
}, },
suit() { suit() {
if (this.card && !isNaN(this.card.suit)) { if (this.card && !isNaN(this.card.suit)) {
let x = ["♦️", "♣️", "♥️", "♠️", "🤑"]; let x = ["♦️", "♣️", "♥️", "♠️", "🤑", "🚂"];
return x[this.card.suit]; return x[this.card.suit];
} else if (this.card.suit) { } else if (this.card.suit) {
return this.card.suit; return this.card.suit;

File diff suppressed because it is too large Load Diff