Files
ages/examplegame/__init__.py
Alek Ratzloff ff5d4484fe Move variables and triggers to be defined in the database
* 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>
2021-11-18 17:32:45 -08:00

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"],
)