Ejemplo n.º 1
0
 def __init__(self):
     self.clock = cl.Clock(self)
     self.week = cl.Week(self)
     self.calendar = cl.SecularCalendar()
     self.productionAI = ai.ProductionAI(self)
     self.jobPoster = ai.JobPoster(self)
     self.hirer = ai.Hirer(self)
     self.firer = ai.Firer(self)
     self.startupAI = ai.StartupAI()
     self.builder = ai.Builder(self)
     self.salaryPayer = ai.SalaryPayer(self)
     ourGen = generator.generator(self)
     self.ourWorld = ourGen.generateWorld(10000, 10, 10)
     Jonestown = d.getLocality()[0]
     #char
     address = Jonestown.find_property()
     yourHome = u.House(Jonestown, address)
     Jonestown.claim_node(address, yourHome)
     self.char = ai.Character(self, "Markemus", "Williamson", 0, Jonestown,
                              yourHome,
                              d.getReligions()[0])
     yourHome.addTenant(self.char)
     spouse = p.People(self, "Susan", "Spinster", 1, Jonestown, yourHome,
                       d.getReligions()[0])
     yourHome.addTenant(spouse)
     self.char.addCapital(10000)
     #makes
     ourGen.makeSpouses()
     ourGen.makeFriends()
     ourGen.makeBosses()
     ourGen.makeChurches(Jonestown)
     ourGen.assignChurches()
     self.gui = gui.gui(self.char)
Ejemplo n.º 2
0
    def workHandler(self):

        self.next_day()

        religionList = d.getReligions()
        unitList = d.getUnit()
        businessList = d.getBusinesses()
        peopleList = d.getPeople()
        bossList = d.getBosses()
        localityList = d.getLocality()

        if self.model.week.state == 'Friday':
            self.model.salaryPayer.paySalaries()

        if self.model.week.state == 'Sunday':
            for person in peopleList:
                person.churchHandler()
            for religion in religionList:
                for business in religion.getBusinesses():
                    for priest in business.getPriestJobs():
                        priest.service()
        #workday
        if self.model.week.state != 'Sunday':
            for business in businessList:
                business.workHandler()
            for person in peopleList:
                person.workHandler()
                person.bossmaker()
            for boss in bossList:
                i_build = self.model.startupAI.whatToBuild(boss)
                self.model.builder.buildChain(boss.businesses[0], i_build)
Ejemplo n.º 3
0
import database as d
import gameMap as g
import generator as gen
import jobs as j
import orders as o
import people as p
import profiles as pr
import unit as u

from conversation import Convo
from gui import gui
from model import Model

#main
model = Model()
Jonestown = d.getLocality()[0]
model.week.machine.set_state('Thursday')

#players
MrMoney = d.getPeople()[0]
MrsMoney = d.getPeople()[1]
you = model.gui.char

CatholicChurch = d.getChurches()[0]
ProtestantChurch  = d.getChurches()[1]

#testbus
testBus = you.startBusiness("Williamson Shipping LTD")
testBus.cash = 1000000

d.addBoss(you)