Refactoring and updating
Fix bug, when steps = 0, but player didn't lose
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user