An engine for text based RPGs