An Agent-Based Game Engine Layer for Interactive Fiction