-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dynasty.py
36 lines (23 loc) · 981 Bytes
/
Dynasty.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# import Decisions # You will have to prefix the commands in this file. (ex: Decisions.processCommand(command))
from Decisions import processCommand
from Models.GameState import GameState
from Models.Assets import Assets
def getCommand(gameCounter: int):
"""Allows the gamer to enter a command from the console."""
return input("Dynasty (" + str(gameCounter) + ") > ")
def main():
command = None
gameState = GameState(Assets(100.0, 10, 10, 10))
quit = False
welcome()
while not quit:
command = getCommand(gameState.turnCount)
if command == "q":
quit = True
processCommand(command) # Defined in Decisions
gameState.turnCount += 1 # NO ++
print("\nCONGRATULATIONS! You lasted " + str(gameState.turnCount) + " rounds.\n")
def welcome():
print("\nWelcome to Dynasty!\n")
welcome.__doc__ = "A friendly welcome to the game. (probably not the most preferred way to document this)"
main()