Started working on function to check the number of command-line arguments
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -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) {
|
||||
|
Reference in New Issue
Block a user