mirror of
https://github.com/neogeek23/Dominion-Strategy-Simulator.git
synced 2026-02-04 11:08:18 +00:00
Add files via upload
This commit is contained in:
parent
d31a3a5d70
commit
ad6eb3ebc9
4
game.py
4
game.py
@ -107,8 +107,8 @@ def get_card_info():
|
|||||||
|
|
||||||
|
|
||||||
def get_starting_deck():
|
def get_starting_deck():
|
||||||
return [["Copper", 7], ["Estate", 3]]
|
# return [["Copper", 7], ["Estate", 3]]
|
||||||
# return [["Market", 2], ["Merchant", 2], ["Smithy", 2], ["Village", 2], ["Moat", 2]]
|
return [["Market", 2], ["Merchant", 2], ["Smithy", 2], ["Village", 2], ["Moat", 2]]
|
||||||
# return [["Militia", 4], ["Cellar", 3], ["Moat", 3]]
|
# return [["Militia", 4], ["Cellar", 3], ["Moat", 3]]
|
||||||
# return [["Silver", 7], ["Merchant", 3]]
|
# return [["Silver", 7], ["Merchant", 3]]
|
||||||
# return [["Copper", 4], ["Mine", 2], ["Remodel", 2], ["Workshop", 2]]
|
# return [["Copper", 4], ["Mine", 2], ["Remodel", 2], ["Workshop", 2]]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from player.player import Player
|
from player.player import Player
|
||||||
from card.card import Card
|
from card.card import Card
|
||||||
|
#name943meats23jet
|
||||||
|
|
||||||
class Pure_Big_Money(Player):
|
class Pure_Big_Money(Player):
|
||||||
def take_action(self):
|
def take_action(self):
|
||||||
@ -34,7 +34,7 @@ class Pure_Big_Money(Player):
|
|||||||
return choice
|
return choice
|
||||||
|
|
||||||
#This will pick either the first or the first least effective purchasing card as this bot doesn't care about that
|
#This will pick either the first or the first least effective purchasing card as this bot doesn't care about that
|
||||||
def militia_input(self, message):
|
def militia_input(self, message, target_type):
|
||||||
choice = self.__get_first_non_Treasure()
|
choice = self.__get_first_non_Treasure()
|
||||||
min_coin = self.get_hand().get_supply()[choice].get_purchase_power()
|
min_coin = self.get_hand().get_supply()[choice].get_purchase_power()
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ from random import randint
|
|||||||
|
|
||||||
class Player:
|
class Player:
|
||||||
def __init__(self, table):
|
def __init__(self, table):
|
||||||
self.__std_chances = 2
|
self.__std_chances = 3
|
||||||
self.__deck = Deck()
|
self.__deck = Deck()
|
||||||
self.__discard = Discard()
|
self.__discard = Discard()
|
||||||
self.__hand = Hand()
|
self.__hand = Hand()
|
||||||
@ -136,11 +136,13 @@ class Player:
|
|||||||
print("You have elected to forfeit any remaining plays.")
|
print("You have elected to forfeit any remaining plays.")
|
||||||
self.__buys = 0
|
self.__buys = 0
|
||||||
elif pile_index >= self.__table.get_pile_count():
|
elif pile_index >= self.__table.get_pile_count():
|
||||||
print("Acceptable inputs range from 0 to " + str(self.__table.get_pile_count() - 1) + ". Try again.")
|
print("Acceptable inputs range from 0 to " + str(self.__table.get_pile_count() - 1) + ".")
|
||||||
chances -= 1
|
chances -= 1
|
||||||
|
print("You have " + str(chances) + " chances left to input correctly.")
|
||||||
elif self.__table.get_pile(pile_index).get_card_group().get_cost() > self.__purchase_power:
|
elif self.__table.get_pile(pile_index).get_card_group().get_cost() > self.__purchase_power:
|
||||||
print("You do not have enough coin. Try again.")
|
print("You do not have enough coin.")
|
||||||
chances -= 1
|
chances -= 1
|
||||||
|
print("You have " + str(chances) + " chances left to input correctly.")
|
||||||
else:
|
else:
|
||||||
self.__buys -= 1
|
self.__buys -= 1
|
||||||
self.__purchase_power -= self.__table.get_pile(pile_index).get_card_group().get_cost()
|
self.__purchase_power -= self.__table.get_pile(pile_index).get_card_group().get_cost()
|
||||||
@ -149,6 +151,7 @@ class Player:
|
|||||||
str(self.__purchase_power) + " coin(s) and " + str(self.__buys) + " buy(s) following purchase.")
|
str(self.__purchase_power) + " coin(s) and " + str(self.__buys) + " buy(s) following purchase.")
|
||||||
self.__table.get_pile(pile_index).transfer_top_card(self.__discard)
|
self.__table.get_pile(pile_index).transfer_top_card(self.__discard)
|
||||||
self.claim_top_card(self.__discard)
|
self.claim_top_card(self.__discard)
|
||||||
|
chances = self.get_std_chances()
|
||||||
|
|
||||||
def take_turn(self):
|
def take_turn(self):
|
||||||
self.__turn_setup()
|
self.__turn_setup()
|
||||||
@ -243,7 +246,7 @@ class Player:
|
|||||||
print("Coin: " + str(self.__purchase_power))
|
print("Coin: " + str(self.__purchase_power))
|
||||||
self.print_hand()
|
self.print_hand()
|
||||||
self.__print_discard()
|
self.__print_discard()
|
||||||
# self.__print_deck()
|
print("")
|
||||||
|
|
||||||
def __turn_setup(self):
|
def __turn_setup(self):
|
||||||
self.__actions.int = 1
|
self.__actions.int = 1
|
||||||
|
|||||||
@ -81,5 +81,7 @@ class Table:
|
|||||||
print(str(index) + ": " + s.identify())
|
print(str(index) + ": " + s.identify())
|
||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
|
print("")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "A table with " + str(len(self.__pile)) + " card piles and " + str(len(self.__player)) + " players."
|
return "A table with " + str(len(self.__pile)) + " card piles and " + str(len(self.__player)) + " players."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user