-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArcadeCore.hpp
68 lines (61 loc) · 1.63 KB
/
ArcadeCore.hpp
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
** EPITECH PROJECT, 2020
** Arcade
** File description:
** Arcade core
*/
#include "scene/Scene.hpp"
#include "libLoader/LibLoader.hpp"
#include "games/AGame/AbstractGame.hpp"
#include <string>
#include <iostream>
#include <vector>
#include <dlfcn.h>
#include <dirent.h>
#include <chrono>
#include <ctime>
#ifndef ARCADECORE_HPP_
#define ARCADECORE_HPP_
class ArcadeCore {
public:
ArcadeCore(std::vector<std::string> av);
ArcadeCore();
~ArcadeCore();
void gameLoop();
std::string getPlayerName() const;
protected:
private:
enum arcadeState
{
RUNNING,
CLOSED
};
Scene *_scene;
LibLoader *_lib;
std::string _playerName;
arcadeState _state;
std::vector<std::string> _av;
int _menu;
int _actualLibrary;
int _actualGame;
int _clock;
void readDir(const std::string path, std::vector<std::string> &vector);
void setScore();
void swapLib(std::string str);
void swapGame(std::string str);
void events();
void movementEvents(std::string event);
int findLib();
int defaultmove;
std::vector<std::string> _score;
std::vector<std::string> _highScore;
std::vector<std::string> _HP;
std::string _name;
std::string _lastMoveEvent;
std::vector<std::string> libPath;
std::vector<std::string> gamePath;
std::vector<std::string> nameScore;
std::vector<std::vector<std::string>> info;
std::vector<std::vector<std::string>> _gamesInfos;
};
#endif /* !ARCADECORE_HPP_ */