Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Ball/Ball.h
- Revision:
- 23:61fa82f76808
- Parent:
- 17:5104ecef5bd0
- Child:
- 29:42651f87522b
diff -r 4e305ff8a050 -r 61fa82f76808 Ball/Ball.h
--- a/Ball/Ball.h Thu Apr 18 11:50:53 2019 +0000
+++ b/Ball/Ball.h Thu Apr 18 22:56:34 2019 +0000
@@ -24,7 +24,8 @@
Vector2D get_position();
int get_radius();
//mutator methods
- void set_velocity(Vector2D vel);
+ void set_ball_speed(int ball_speed); //this is a constant multiplier for the ball velocity in both axes
+ void set_velocity(Vector2D vel); //this is used to set the velocity at one specific instant in the code
void set_position(Vector2D pos);
void set_radius(int radius);
@@ -33,5 +34,6 @@
int _x;
int _y;
Vector2D _velocity;
+ int _ball_speed;
};
#endif
\ No newline at end of file