PY-2017.3 <Brad@Libra Merge branch 'master'

This commit is contained in:
bradstein 2018-01-10 06:42:44 -06:00
commit 517b18fffe
10 changed files with 13 additions and 50 deletions

View File

@ -1,5 +0,0 @@
<application>
<component name="LafManager">
<laf class-name="com.intellij.ide.ui.laf.darcula.DarculaLaf" />
</component>
</application>

View File

@ -1,5 +0,0 @@
<application>
<component name="EditorColorsManagerImpl">
<global_color_scheme name="Darcula" />
</component>
</application>

View File

@ -1,13 +0,0 @@
<application>
<component name="XDebuggerSettings">
<data-views />
<general />
<debuggers>
<debugger id="javascript">
<configuration>
<custom-object-presentation />
</configuration>
</debugger>
</debuggers>
</component>
</application>

View File

@ -1,6 +0,0 @@
<application>
<component name="DefaultFont">
<option name="FONT_SIZE" value="18" />
<option name="FONT_SCALE" value="1.5" />
</component>
</application>

View File

@ -1,5 +0,0 @@
<application>
<component name="FileTypeManager" version="17">
<ignoreFiles list="*$py.class;*.hprof;*.pyc;*.pyo;*.rbc;*.yarb;*~;.DS_Store;.git;.hg;.svn;CVS;__pycache__;_svn;vssver.scc;vssver2.scc;" />
</component>
</application>

View File

@ -107,8 +107,8 @@ def get_card_info():
def get_starting_deck():
return [["Copper", 7], ["Estate", 3]]
# return [["Market", 2], ["Merchant", 2], ["Smithy", 2], ["Village", 2], ["Moat", 2]]
# return [["Copper", 7], ["Estate", 3]]
return [["Market", 2], ["Merchant", 2], ["Smithy", 2], ["Village", 2], ["Moat", 2]]
# return [["Militia", 4], ["Cellar", 3], ["Moat", 3]]
# return [["Silver", 7], ["Merchant", 3]]
# return [["Copper", 4], ["Mine", 2], ["Remodel", 2], ["Workshop", 2]]

View File

@ -1,6 +1,6 @@
from player.player import Player
from card.card import Card
#name943meats23jet
class Pure_Big_Money(Player):
def take_action(self):
@ -34,7 +34,7 @@ class Pure_Big_Money(Player):
return choice
#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()
min_coin = self.get_hand().get_supply()[choice].get_purchase_power()

View File

@ -8,7 +8,7 @@ from random import randint
class Player:
def __init__(self, table):
self.__std_chances = 2
self.__std_chances = 3
self.__deck = Deck()
self.__discard = Discard()
self.__hand = Hand()
@ -136,11 +136,13 @@ class Player:
print("You have elected to forfeit any remaining plays.")
self.__buys = 0
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
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:
print("You do not have enough coin. Try again.")
print("You do not have enough coin.")
chances -= 1
print("You have " + str(chances) + " chances left to input correctly.")
else:
self.__buys -= 1
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.")
self.__table.get_pile(pile_index).transfer_top_card(self.__discard)
self.claim_top_card(self.__discard)
chances = self.get_std_chances()
def take_turn(self):
self.__turn_setup()
@ -243,7 +246,7 @@ class Player:
print("Coin: " + str(self.__purchase_power))
self.print_hand()
self.__print_discard()
# self.__print_deck()
print("")
def __turn_setup(self):
self.__actions.int = 1

View File

@ -81,5 +81,7 @@ class Table:
print(str(index) + ": " + s.identify())
index += 1
print("")
def __str__(self):
return "A table with " + str(len(self.__pile)) + " card piles and " + str(len(self.__player)) + " players."

View File

@ -1,8 +0,0 @@
<application>
<component name="ShowUsagesSettings">
<option name="GROUP_BY_USAGE_TYPE" value="false" />
<option name="GROUP_BY_MODULE" value="false" />
<option name="GROUP_BY_PACKAGE" value="false" />
<option name="GROUP_BY_FILE_STRUCTURE" value="false" />
</component>
</application>