-- Text Adventure -- world data (starter). -- -- Each room is a dictionary with name, description, exits, items. -- Exits map a direction to a room id. Items is a list of strings. local M = {} M.start_id = 1 M.rooms = { [1] = { name = "Forest Path", description = "You are on a moss covered forest path. Birdsong drifts on the air.", exits = { north = 2 }, items = {}, }, [2] = { name = "Clearing", description = "A small clearing of wildflowers.", exits = { south = 1, east = 3 }, items = { "torch" }, }, [3] = { name = "Cave Entrance", description = "A cool, damp cave mouth opens to the east. A rope lies coiled on the floor.", exits = { west = 2, down = 4 }, items = { "rope" }, }, [4] = { name = "Treasure Chamber", description = "Crystals glitter on the walls. In the centre, on a stone pedestal, rests a gold coin.", exits = { up = 3 }, items = { "gold coin" }, }, } return M