Refactoring and updating

Fix bug, when steps = 0, but player didn't lose
This commit is contained in:
2025-04-30 19:36:14 +03:00
parent 7f0e023e0c
commit d905c1a3f9
7 changed files with 85 additions and 65 deletions

View File

@@ -1,5 +1,5 @@
#ifndef CLIENT
#define CLIENT
#ifndef CLIENT_HPP
#define CLIENT_HPP
#include <iostream>
#include <cstring>
@@ -7,14 +7,17 @@
#include <arpa/inet.h>
#include <unistd.h>
#include <netdb.h>
class Client{
private:
int sock;
public:
Client();
void run(const std::string& h = "localhost", const unsigned short p = 1024u);
int ping(struct sockaddr_in);
void run(const std::string&, const unsigned short);
void game();
int ping(struct sockaddr_in);
};
#endif