Started working on function to check the number of command-line arguments

master
Aadhavan Srinivasan 9 months ago
parent f41c3d22e2
commit 26999a1145

@ -74,6 +74,14 @@ raylib::Vector2 changeVelocityAfterCollision(Paddle paddle, Ball ball) {
float new_y_vel = abs(BASE_SPEED * sinf(bounce_angle)) * signum(ball.vel.y); /* Keep the sign of the y-velocity */
return raylib::Vector2(new_x_vel, new_y_vel);
}
/* Checks the number and type of the command-line arguments. Throws an exception
if the args are invalid. */
void check_num_args(int argc, char** argv) {
}
/* This function checks the command-line arguments passed to the program.
@ -185,7 +193,7 @@ int main(int argc, char** argv) {
/* GameType struct, to define whether the game is in single or multi-player mode, and
to hold the appropriate socket */
GameType type;
try {
type = check_server_client(argc, argv);
} catch(int e) {

Loading…
Cancel
Save