added state management, levels and dungeon generation