Refactoring and updating
Fix bug, when steps = 0, but player didn't lose
This commit is contained in:
@@ -12,16 +12,18 @@
|
||||
#include <cstring>
|
||||
|
||||
const int MAX_CLIENTS = 512;
|
||||
const int BUFFER_SIZE = 1024;
|
||||
|
||||
class Server {
|
||||
private:
|
||||
bool service_mode;
|
||||
int server_fd;
|
||||
void handle_client(int client_socket, bool _mode); // Принимает клиентский сокет
|
||||
int server_socket;
|
||||
|
||||
void handle_client(int socket, bool flag, int steps);
|
||||
bool check_status(Maze& maze);
|
||||
public:
|
||||
Server(const std::string& h = "localhost", const unsigned short p = 1024u, bool service_mode = false);
|
||||
void start(); // Запуск сервера
|
||||
Server(const std::string& host, const unsigned short port, bool service_flag);
|
||||
void start(int steps = 10);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user