from story_node import StoryNode from player import Player from activity import Activity from theater_acts import * from text_to_speech import * #create each node in the story theater = StoryNode("theater") box_office = StoryNode("box office") concessions = StoryNode("concessions") ticket_checker = StoryNode("ticket checker") movie = StoryNode("movie") #add connections between nodes theater.addChild(box_office).addChild(concessions) concessions.addChild(box_office).addChild(ticket_checker) box_office.addChild(concessions).addChild(ticket_checker) ticket_checker.addChild(movie) #add prerequisites (something that must be completed before moving to this node) ticket_checker.addPrereq("ticket") #movies and menu are lists of options for the activity movies = ["Inside Out", "Tomorrowland", "Minions", "Home"] menu = ["soda", "popcorn", "candy", "finished"] #create activities and add them to their corresponding nodes theater.setActivity(Activity(theaterActivity))
penguins = StoryNode("penguins") otters = StoryNode("otters") pandas = StoryNode("pandas") exhibits = [monkeys, elephants, lions, tigers, penguins, otters, pandas] current_exhibits = [] #pick one of the exhibits for x in range(4): rand_num = random.randint(0, len(exhibits)-1) current_exhibits.append(exhibits[rand_num]) exhibits.remove(exhibits[rand_num]) #add children entrance.addChild(current_exhibits[0]).addChild(current_exhibits[1]).addChild(current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[0].addChild(current_exhibits[1]).addChild(current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[1].addChild(current_exhibits[0]).addChild(current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[2].addChild(current_exhibits[0]).addChild(current_exhibits[1]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[3].addChild(current_exhibits[0]).addChild(current_exhibits[1]).addChild(current_exhibits[2]).addChild(parking_lot) #set activities entrance.setActivity(Activity(entranceAct)) parking_lot.setActivity(Activity(parking_lotAct)) monkeys.setActivity(Activity(monkeyAct)) elephants.setActivity(Activity(elephantAct)) lions.setActivity(Activity(lionAct)) tigers.setActivity(Activity(tigerAct)) penguins.setActivity(Activity(penguinAct))
from story import Story from story_node import StoryNode from player import Player from activity import Activity from text_to_speech import * from _vault_acts import * #Nodes main = StoryNode("main") left = StoryNode("left") right = StoryNode("right") #Children main.addChild(left).addChild(right) right.addChild(main) left.addChild(main) #Activities main.setActivity(Activity(main_act)) left.setActivity(Activity(left_act)) right.setActivity(Activity(right_act)) #Storyline vault_story_line = [main, left, right]
from story import Story from story_node import StoryNode from player import Player from activity import Activity from theater_acts import * from text_to_speech import * #create each node in the story theater = StoryNode("theater") box_office = StoryNode("box office") concessions = StoryNode("concessions") ticket_checker = StoryNode("ticket checker") movie = StoryNode("movie") #add connections between nodes theater.addChild(box_office).addChild(concessions) concessions.addChild(box_office).addChild(ticket_checker) box_office.addChild(concessions).addChild(ticket_checker) ticket_checker.addChild(movie) #add prerequisites (something that must be completed before moving to this node) ticket_checker.addPrereq("ticket") #movies and menu are lists of options for the activity movies = ["Inside Out", "Tomorrowland", "Minions", "Home"] menu = ["soda", "popcorn", "candy", "finished"] #create activities and add them to their corresponding nodes theater.setActivity(Activity(theaterActivity)) box_office.setActivity(Activity(boxOfficeActivity, movies))
food = StoryNode("food") treat = StoryNode("treat") favorite_toy = StoryNode("toy") siblings = StoryNode("siblings") other_pets = StoryNode("other pets") temperment = StoryNode("temperment") vet = StoryNode("vet") walk = StoryNode("walks") tricks = StoryNode("tricks") tail = StoryNode("tail") done = StoryNode("done", "It was nice talking to you. But I have to go. Goodbye!") """ADD CHILDREN""" have_pets.addChild(kinds_of_pets).addChild(done) #.addChild(dream_pets) kinds_of_pets.addChild(pet_name).addChild(done) pet_name.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) pet_breed.addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) age.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) color.addChild(pet_breed).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) sound.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) mess.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) food.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) siblings.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) other_pets.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) temperment.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done) walk.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(tricks).addChild(tail).addChild(done) #dream_pet.addChild(kinds_of_pets).addChild(color).addChild(sound).addChild(food).addChild(siblings).addChild(walk).addChild(done)
tigers = StoryNode("tigers") penguins = StoryNode("penguins") otters = StoryNode("otters") pandas = StoryNode("pandas") exhibits = [monkeys, elephants, lions, tigers, penguins, otters, pandas] current_exhibits = [] #pick one of the exhibits for x in range(4): rand_num = random.randint(0, len(exhibits) - 1) current_exhibits.append(exhibits[rand_num]) exhibits.remove(exhibits[rand_num]) #add children entrance.addChild(current_exhibits[0]).addChild(current_exhibits[1]).addChild( current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[0].addChild(current_exhibits[1]).addChild( current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[1].addChild(current_exhibits[0]).addChild( current_exhibits[2]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[2].addChild(current_exhibits[0]).addChild( current_exhibits[1]).addChild(current_exhibits[3]).addChild(parking_lot) current_exhibits[3].addChild(current_exhibits[0]).addChild( current_exhibits[1]).addChild(current_exhibits[2]).addChild(parking_lot) #set activities entrance.setActivity(Activity(entranceAct)) parking_lot.setActivity(Activity(parking_lotAct)) monkeys.setActivity(Activity(monkeyAct)) elephants.setActivity(Activity(elephantAct))