Skip to content

Instantly share code, notes, and snippets.

@pdex
Created February 16, 2010 19:01
Show Gist options
  • Save pdex/305798 to your computer and use it in GitHub Desktop.
Save pdex/305798 to your computer and use it in GitHub Desktop.
Baseball Warz!
#!/usr/bin/python
""" This is a rough draft of ccumby's dream world """
class Territory:
#TODO should there be different kinds of terrain?
def __init__(self):
self.occupier = None
class Team:
def __init__(self, name):
self.name = name
#TODO how many players on a team?
self.players = list()
def __repr__(self):
return self.name
class Player:
#TODO: What are my stats?
def __init__(self, name):
self.name = name
class World:
def __init__(self, teams):
self.teams = teams
#TODO What's the structure of the territories?
# a graph?
# a grid?
self.territories = list()
if __name__ == '__main__':
maxTeams = 8
#TODO how many territories?
maxTerritories = None
world = World([Team("Team #" + str(i+1)) for i in range(maxTeams)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment