5
Diff: Paddle.cpp
- Revision:
- 1:5285b567f4c9
- Parent:
- 0:fe2b9c70f7b8
- Child:
- 2:aae12f64103b
diff -r fe2b9c70f7b8 -r 5285b567f4c9 Paddle.cpp --- a/Paddle.cpp Wed Feb 08 19:51:11 2017 +0000 +++ b/Paddle.cpp Wed Mar 01 13:52:30 2017 +0000 @@ -12,7 +12,6 @@ void Paddle::init(int x,int height,int width) { - _x = x; // x value on screen is fixed _y = HEIGHT/2 - height/2; // y depends on height of screen and height of paddle _height = height; @@ -58,4 +57,9 @@ int Paddle::get_score() { return _score; +} + +Vector2D Paddle::get_pos() { + Vector2D p = {_x,_y}; + return p; } \ No newline at end of file