Files
2023-08-12 12:22:36 +02:00

35 lines
618 B
C++

#pragma once
#include <vector>
#include "misc/Time.h"
namespace td {
namespace server {
class Server;
class Lobby {
private:
Server* m_Server;
bool m_GameStarted = false;
std::uint64_t m_StartTime = 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