# object Location
# attribute name
#
# object Character
# attribute name
# attribute location
#
# object Fighter inherits from Character
# attribute health level
# function attack(Character)
#
# object Player inherits from Fighter
# function move(Location)
#
# object Foe inherits from Fighter
#
# object Friend inherits from Character
# function defend(Character)
# The main file, __init__.py
# This file runs the whole game by calling playGame
# In this directory, we have a file named heroClass.py, a file named monster.py, and a folder named gui which contains the file displayGame.py. We also have a folder named images where all assets are stored.
import heroClass
from monster import *
from gui import displayGame
def playGame():
# When we import a file normally, we have to reference that file name before
# the functions/classes in it
mainPlayer = heroClass.Hero("Fred")
# When we use from file import *, all the functions/classes from that file
# get imported directly into our current namespace!
monsters = spawnMonsters()
# We can also use from directory import file to organize files nicely
displayGame.runGame(mainPlayer, monsters)
#########################################################
# Algorithmic plan for populating the field with monsters
#########################################################
#
# First: generate a set of monsters with varying attack levels
# - number of monsters should be determined by field size
# - level should be determined by hero level at beginning: half should be at
# hero level, 1/4 one level above, 1/4 two levels above, and 1 five levels above
# - distinguish monsters based on fill color?
#
# Second: determine where monsters should be placed on the field
# - use random library to randomly place them
# - but weight the placement so that easier monsters mostly appear closer to the hero
# - non-randomly place the boss monster at the end
#
# Third: don't start monster movement until the gameplay starts
# - have a class method to pause/unpause all monsters? or put a block in timerFired?
#########################################################
message = "Now we're thinking with colors!"
# CITATION: I got the bcolors class from https://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
print(bcolors.HEADER + message + bcolors.ENDC)