Files
Text-Adventure/main.cpp
T

52 lines
1.6 KiB
C++
Raw Normal View History

2026-08-07 13:10:07 -05:00
#include "game.h"
int main(int argc, char *argv[]) {
2026-08-18 12:04:39 -05:00
Game game; // Calls default constructor which Initializes GAME
2026-08-07 13:10:07 -05:00
2026-09-01 16:27:01 -05:00
fs::path path("Resources/rooms.json");
std::vector<std::vector<Room>> rooms = {
{
{
0,
"Test Room 1",
"First Test Room",
{{0, S, false}, {1, E, false}},
{{0, "Rock", "A Grey Rock", {"Rock"}, ObjectType::SCENERY, false, 0}},
},
{1,
"Test Room 2",
"A court yard",
{{2, W, false}, {3, E, false}, {4, S, false}},
{{1,
"Tree",
"A fine looking Tree stands in the courtyard",
{"Tree"},
ObjectType::SCENERY,
false,
1}}},
},
{{3,
"Test Room 3",
"You can hear the sound of a waterfall nearby",
{{5, N, false}, {6, E, false}},
{{3, "Waterfall", "A fine waterfall on a cliff", {"Waterfall"}, ObjectType::SCENERY, false, 3}}}}};
nlohmann::json j(rooms);
std::fstream outFile(absolute(path), std::fstream::in | std::fstream::out | std::fstream::app);
outFile << std::setw(4) << j << std::endl;
outFile.close();
/*if (!game) {
2026-08-28 20:53:04 -05:00
game.Init();
Game::SetGameInstance(&game);
2026-08-28 14:54:45 -05:00
}
while (game.GetIsActive()) {
2026-08-18 11:59:09 -05:00
game.Run();
2026-09-01 16:27:01 -05:00
}*/
2026-08-07 13:10:07 -05:00
return 0;
}