Exemplo n.º 1
0
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))
concessions.setActivity(Activity(concessionsActivity, menu))
ticket_checker.setActivity(Activity(ticketCheckerActivity))
movie.setActivity(Activity(movieActivity))


movie_story_line = [theater, concessions, box_office, ticket_checker, movie]
Exemplo n.º 2
0
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))
otters.setActivity(Activity(otterAct))
pandas.setActivity(Activity(pandaAct))

zoo_story_line = [entrance, monkeys, elephants, lions, tigers, penguins, otters, pandas, parking_lot]
Exemplo n.º 3
0
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]
Exemplo n.º 4
0
#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))
concessions.setActivity(Activity(concessionsActivity, menu))
ticket_checker.setActivity(Activity(ticketCheckerActivity))
movie.setActivity(Activity(movieActivity))

movie_story_line = [theater, concessions, box_office, ticket_checker, movie]
Exemplo n.º 5
0
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)
favorite_toy.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(treat).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done)
big_or_small.addChild(pet_breed).addChild(color).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)
sleep.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(food).addChild(treat).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done)
treat.addChild(pet_breed).addChild(color).addChild(big_or_small).addChild(age).addChild(sound).addChild(mess).addChild(sleep).addChild(food).addChild(favorite_toy).addChild(siblings).addChild(other_pets).addChild(temperment).addChild(vet).addChild(walk).addChild(tricks).addChild(tail).addChild(done)
vet.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(walk).addChild(tricks).addChild(tail).addChild(done)
tricks.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(tail).addChild(done)
tail.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(done)

"""ACTIVITIES"""
have_pets.setActivity(Activity(have_pets_act))
#dream_pet.setActivity(Activity(pet_act))
kinds_of_pets.setActivity(Activity(kinds_act))
pet_name.setActivity(Activity(name_act))
pet_breed.setActivity(Activity(breed_act))
age.setActivity(Activity(age_act))
favorite_toy.setActivity(Activity(toy_act))
color.setActivity(Activity(color_act))
big_or_small.setActivity(Activity(size_act))
sound.setActivity(Activity(sound_act))
mess.setActivity(Activity(mess_act))
sleep.setActivity(Activity(sleep_act))
food.setActivity(Activity(food_act))
treat.setActivity(Activity(treat_act))
siblings.setActivity(Activity(sibs_act))
other_pets.setActivity(Activity(friends_act))
Exemplo n.º 6
0
    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))
otters.setActivity(Activity(otterAct))
pandas.setActivity(Activity(pandaAct))

zoo_story_line = [
    entrance, monkeys, elephants, lions, tigers, penguins, otters, pandas,
    parking_lot
]