Added call to SockQuit at the end

master
Aadhavan Srinivasan 11 months ago
parent 1f99c0929f
commit 4c256d8800

@ -17,7 +17,7 @@ const int RECT_H = HEIGHT / 3;
const int RECT_W = 30;
const int PADDLE_SPEED = 8;
const int CIRC_RAD = 10;
const float BASE_BOUNCE_DEG = 60;
const float BASE_BOUNCE_DEG = 45;
const float BASE_BOUNCE_RAD = (BASE_BOUNCE_DEG / 180.0) * M_PI;
const float BASE_SPEED_COMPONENTS = 18;
const float BASE_SPEED = sqrt(powf(BASE_SPEED_COMPONENTS, 2) * 2);
@ -63,8 +63,8 @@ Mode check_server_client(int argc, char** argv, Server* server, Client* client)
throw EXCEPT_TOOFEWARGS;
}
connect_code = std::string(argv[2]); /* The connect code is a special string, that contains the server address and port. It is given by the server. */
addr_port = connect_code::decode(connect_code);
try {
addr_port = connect_code::decode(connect_code);
client = new Client(4, 'T', addr_port[0].data(), std::stoi(addr_port[1]));
return M_CLIENT;
} catch (int e) {
@ -270,6 +270,7 @@ int main(int argc, char** argv) {
}
window.Close();
sock_quit();
return 0;
}

Loading…
Cancel
Save