Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class quick_game_of_scythe(object):
- """Return a number of players of count *players* where each player has a score"""
- def __init__(self, player, score)
- class player(object):
- """Return a Player whose faction is *faction* and player board is *player board*"""
- def __init__(self, player_board, faction_mat)
- class Score(object):
- """ A Score of ABC Bank with a Checking Account.
- A score has the following properties:
- Attributes:
- Faction: Which Faction they were
- Player: Which mat were they using?
- Gold = Amount of Unspent gold
- Popularity thresholds: 0-6: Tier 1, 7-12: Tier 2, 13-18: Tier 3
- Stars: Number of Stars
- Territories: Number of owned territories (inc factories, flags, traps)
- Resources: Total count // 2 * some number
- Structure tiles: which one of the 7 is used
- """
- def __init__(self, color, player_board, gold=0, popularity=0, stars=0, territories=0, resources=0, structure_gold=0):
- """Return a Score whose faction is *faction* and starting score is *gold* with popularity."""
- self.color = color
- self.player_board = player_board
- self.gold = gold
- self.popularity = popularity
- self.stars = stars
- self.territories = territories
- self.resources = resources
- self.structure_gold = structure_gold
- def gold_score(self):
- """Calculate the Gold from the Popularity Track"""
- if self.popularity < 7:
- self.gold += (self.stars * 3 + self.territories * 2 + self.resources // 2 + self.structure_gold)
- return self.gold
- elif self.popularity < 13:
- self.gold += (self.stars * 4 + self.territories * 3 + (self.resources // 2) * 2 + self.structure_gold)
- return self.gold
- else:
- self.gold += (self.stars * 5 + self.territories * 4 + (self.resources // 2) * 3 + self.structure_gold)
- return self.gold
- def game_of_scythe(players):
- while players == 0:
- print scores
- break
- #for i in scores:
- else:
- # Faction
- while True:
- faction_player = raw_input("What Faction, Player Mat combination was player {} playing? \n > Example: Saxony, Industrial || Rusviet, 2A \n > ".format(players))
- if faction_player = "!options":
- return """Factions | Player Board
- Saxony / Black | Industrial / 1
- Polandia / White | Militant / 2A
- Albion / Green | Agricultural /
- Nordic / Blue | Mechanical
- Rusviet / Red | Patriotic
- Togawa / Purple | Engineering
- Crimea / Yellow | Innovative"""
- else:
- faction, mat = map(str, faction_player.split(','))
- break
- print('Ah, player {} was playing as: {} with the {} mat!'.format(players, faction, mat))
- # "Stating Gold"
- while True:
- start_gold = int(raw_input("And how much Gold in coins did they end the game with (before scoring)? \n > "))
- if start_gold < 0:
- print('Sorry, I don\'t believe that\'s how much gold they have...')
- elif start_gold > 100:
- print('Sorry, I don\'t believe that\'s how much gold they have...')
- else:
- print('So, {} ended the game with {} coins. Let\'s start determining their score!'.format(faction, start_gold))
- break
- # popularity Add flair on tiers?
- pop = int(raw_input("And how much Popularity did {} accrue? \n > ".format(faction)))
- if pop < 7:
- print("Ah, so Tier 1, jerk...")
- elif pop < 13:
- print("Tier 2, well done!")
- elif pop < 19:
- print("Wow, Tier 3 of Scoring!")
- else:
- print("That's not a real score!")
- # stars
- stars = int(raw_input("And how many Stars did {} place? \n > ".format(faction)))
- if stars > 6:
- print("That's not a real amount of Stars you can have! Start over!")
- game_of_scythe(players)
- # territories
- print("""And how many Territories (in hexes) did {} control at the end of game?\nRemember, the Factory counts as 3 hexes, Albion's Flagged Territories count as 2 hexes.\nControl of Territories = Units (non-Airship) > Structure > Traps / Tokens
- """.format(faction))
- hexes = int(raw_input(" > "))
- # resources
- resources = int(raw_input("And how many total resources did {} end with on those hexes? \n > ".format(faction)))
- # structure gold
- struct_bonus = int(raw_input("How much Structure Bonus Gold did {} earn? \n > ".format(faction)))
- # final tally:
- endscore = Score(faction, mat, start_gold, pop, stars, hexes, resources, struct_bonus)
- print("Okay, so the {} {} scored {}!").format(
- mat, faction, endscore.gold_score())
- scores.append([faction, mat, endscore.gold])
- players -= 1
- game_of_scythe(players)
- players = int(raw_input("How many players were in this game of Scythe (including Automa)? \n > "))
- scores = []
- game_of_scythe(players)
Add Comment
Please, Sign In to add comment