restructure project

This commit is contained in:
2023-08-13 11:59:13 +02:00
parent b4836847f5
commit 50c17e8ed1
210 changed files with 471 additions and 422 deletions

34
include/server/Lobby.h Normal file
View File

@@ -0,0 +1,34 @@
#pragma once
#include <vector>
#include "td/misc/Time.h"
namespace td {
namespace server {
class Server;
class Lobby {
private:
Server* m_Server;
bool m_GameStarted = false;
std::uint64_t m_StartTimerTime = 0;
std::vector<std::uint8_t> m_Players;
utils::AutoTimer m_Timer;
public:
Lobby(Server* server);
void OnPlayerJoin(std::uint8_t playerID);
void OnPlayerLeave(std::uint8_t playerID);
void SendTimeRemaining();
void Tick();
//static constexpr int LobbyWaitingTime = 2 * 60 * 1000; // in millis
static constexpr int LobbyWaitingTime = 5 * 1000; // in millis
};
} // namespace server
} // namespace td