forked from Game-as-a-Service/Machi-Koro-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cc
29 lines (23 loc) · 755 Bytes
/
main.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <drogon/drogon.h>
#include <iostream>
#include <string>
#include <vector>
#include "models/machikoro_game.h"
int main() {
/*
//Set HTTP listener address and port
drogon::app().addListener("0.0.0.0", 8080);
//Load config file
//drogon::app().loadConfigFile("../config.json");
//Run HTTP framework,the method will block in the internal event loop
drogon::app().run();
*/
std::vector<std::string> names = {"Alice", "Bob", "Cindy", "David"};
MachiKoroGame game(names);
std::cout << "Game ID: " << game.get_game_id() << std::endl;
std::cout << "players: " << std::endl;
for (const auto& player: game.get_players()) {
std::cout << player->get_name() << std::endl;
}
return 0;
}