* Variables are now defined in the database, rather than the game itself. * Triggers are now defined in the database, rather than hidden away in a method in the game. Custom triggers can now be added as well, in case a game needs more complex behavior that isn't necessarily available in the base library. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
18 lines
341 B
Python
18 lines
341 B
Python
from agame.game import Game, Database
|
|
from agame.item import Item
|
|
from agame.room import Room
|
|
from agame.action import *
|
|
from agame.trigger import *
|
|
|
|
# This is the *game* here
|
|
database = Database()
|
|
|
|
from . import rooms
|
|
from . import vars
|
|
|
|
# Build the game state
|
|
game = Game(
|
|
database=database,
|
|
room=database.rooms["cabin_inside"],
|
|
)
|