43 lines
835 B
C++
43 lines
835 B
C++
#pragma once
|
|
#include "player.h"
|
|
#include "location.h"
|
|
#include "item.h"
|
|
#include "npc.h"
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
class Game {
|
|
public:
|
|
void run();
|
|
|
|
private:
|
|
bool isRunning = true;
|
|
|
|
Player player;
|
|
std::vector<Location> locations;
|
|
std::vector<Item> itemDatabase;
|
|
std::vector<NPC> npcs;
|
|
|
|
void showMainMenu();
|
|
|
|
void loadItems();
|
|
void loadLocations();
|
|
|
|
ItemType parseItemType(const std::string& type);
|
|
|
|
Location* getCurrentLocation();
|
|
|
|
void interactWithNPC(Location& location);
|
|
void startCombat(NPC& npc);
|
|
void applyDialogResult(NPC& npc, const DialogOption& option);
|
|
|
|
void render();
|
|
void processCommand();
|
|
|
|
void movePlayer(int dx, int dy);
|
|
void handleTile(char tile);
|
|
|
|
void openChest(Location& location);
|
|
|
|
bool solveRiddle(Location& location);
|
|
}; |