Add files via upload

This commit is contained in:
Brad Stein 2017-12-30 12:15:51 -06:00 committed by GitHub
parent 5c57b35472
commit f787d2bad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 38 additions and 38 deletions

View File

@ -31,11 +31,11 @@ class Card:
self.effect()
def effect(self):
# This is here so that 'special' cards can override this function so that unique card effects can happen.
# This is here so that 'special' card can override this function so that unique card effects can happen.
pass
def passive(self):
# This is here so that 'special' cards can override this function so that unique card passives can happen.
# This is here so that 'special' card can override this function so that unique card passives can happen.
pass
def get_name(self):

View File

@ -1,4 +1,4 @@
from card import Card
from card.card import Card
class Cellar(Card):

View File

@ -1,4 +1,4 @@
from card import Card
from card.card import Card
class Merchant(Card):

View File

@ -1,4 +1,4 @@
from card import Card
from card.card import Card
from random import randint
@ -8,7 +8,7 @@ class Militia(Card):
if self._Card__owner != player and not player.get_hand().blocks_attack(self.get_name()):
player.print_hand()
print("Player " + str(self._Card__owner.get_table().get_players().index(player)) + ", you MUST discard "
"down to 3 cards.")
"down to 3 card.")
self.__force_discard(self._Card__owner.get_std_chances(), player)
def __force_discard(self, chances, player):

View File

@ -1,5 +1,5 @@
from card import Card
from trash_gain_card import TrashGainEffectCard
from card.card import Card
from card.trash_gain_card import TrashGainEffectCard
class Mine(TrashGainEffectCard):

View File

@ -1,4 +1,4 @@
from card import Card
from card.card import Card
class Moat(Card):

View File

@ -1,4 +1,4 @@
from trash_gain_card import TrashGainEffectCard
from card.trash_gain_card import TrashGainEffectCard
class Remodel(TrashGainEffectCard):

View File

@ -1,4 +1,4 @@
from card import Card
from card.card import Card
class TrashGainEffectCard(Card):

18
game.py
View File

@ -1,12 +1,12 @@
from table import Table
from player import Player
from card import Card
from militia import Militia
from moat import Moat
from cellar import Cellar
from merchant import Merchant
from mine import Mine
from remodel import Remodel
from table.table import Table
from player.player import Player
from card.card import Card
from card.militia import Militia
from card.moat import Moat
from card.cellar import Cellar
from card.merchant import Merchant
from card.mine import Mine
from card.remodel import Remodel
def main():

View File

@ -1,4 +1,4 @@
from supply import Supply
from table.supply import Supply
from random import shuffle

View File

@ -1,4 +1,4 @@
from supply import Supply
from table.supply import Supply
class Discard(Supply):

View File

@ -1,4 +1,4 @@
from supply import Supply
from table.supply import Supply
class Hand(Supply):

View File

@ -1,8 +1,8 @@
from deck import Deck
from discard import Discard
from hand import Hand
from card import Card
from counter import Counter
from player.deck import Deck
from player.discard import Discard
from player.hand import Hand
from player.counter import Counter
from card.card import Card
class Player:
@ -57,7 +57,7 @@ class Player:
elif lacking_cards == 1:
print("You are lacking " + str(lacking_cards) + " card. You cannot draw anymore.")
else:
print("You are lacking " + str(lacking_cards) + " cards. You cannot draw anymore.")
print("You are lacking " + str(lacking_cards) + " card. You cannot draw anymore.")
if spillover > 0:
for i in range(how_many - spillover):
@ -116,7 +116,7 @@ class Player:
if counter is not None:
counter.int = 0
else:
print("There are no more acceptable cards in hand, moving to next phase.")
print("There are no more acceptable card in hand, moving to next phase.")
if counter is not None:
counter.int = 0
@ -128,7 +128,7 @@ class Player:
def take_buy(self):
if self.__hand.contains_one_of([Card.CardType.Treasure]):
print("\nPlease play all Treasure cards that you want to play.")
print("\nPlease play all Treasure card that you want to play.")
play_another = Counter(self.__hand.get_card_type_count(Card.CardType.Treasure))
while play_another.int > 0:

View File

@ -1,4 +1,4 @@
from supply import Supply
from table.supply import Supply
class Pile(Supply):
def get_card_group(self):

View File

@ -1,5 +1,5 @@
from trash import Trash
from pile import Pile
from table.trash import Trash
from table.pile import Pile
class Table:
@ -52,7 +52,7 @@ class Table:
def play(self):
turn = 0
# turn < 4 is for testing, otherwise endless as buying cards is not yet done
# turn < 4 is for testing, otherwise endless as buying card is not yet done
while not self.are_there_any_empty_piles() and turn < 10:
self.print()
self.__player[turn % len(self.__player)].take_turn()

View File

@ -1,4 +1,4 @@
from pile import Pile
from table.pile import Pile
class Trash(Pile):