-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (30 loc) · 784 Bytes
/
main.cpp
File metadata and controls
39 lines (30 loc) · 784 Bytes
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
30
31
32
33
34
35
36
37
38
39
#include "betting_strategy.h"
#include "gambler.h"
#include "logger.h"
#include "wheel.h"
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <set>
#include <thread>
using namespace casino::logger;
using namespace casino::gambler;
using namespace casino::wheel;
using namespace casino::betting_strategy;
int main()
{
GLOBAL_DEFAULT_LOG_LEVEL = WARNING;
Logger lg = Logger("main");
Wheel w;
w.start();
constexpr double INITIAL_MONEY = 10000;
RecoverBetMoneyStrategy strategy(INITIAL_MONEY);
Gambler g1 = Gambler(&strategy, &w);
g1.start_subscription();
g1.start_auto_betting();
std::this_thread::sleep_for(std::chrono::milliseconds(10000));
w.stop();
Stats s = strategy.get_stats();
s.print();
return 0;
}