Yang Zhenye 201199680
Dependencies: mbed
Diff: Ball/Ball.cpp
- Revision:
- 5:fcad75e9b9e1
- Parent:
- 2:baca89f466bc
diff -r eb8dca1dc341 -r fcad75e9b9e1 Ball/Ball.cpp --- a/Ball/Ball.cpp Wed May 13 14:55:07 2020 +0000 +++ b/Ball/Ball.cpp Thu May 14 14:13:03 2020 +0000 @@ -1,3 +1,15 @@ +/* +ELEC2645 Embedded Systems Project +School of Electronic & Electrical Engineering +University of Leeds +2019/20 + +Name:Yang Zhenye +Username:el17zy +Student ID Number:201199680 +Date:2020/5/12 +*/ + #include "Ball.h" Ball::Ball() @@ -6,19 +18,10 @@ } Ball::~Ball() -{ for(i = 20; i >0; i--) { -_x = 40 - _speed -_y = 40 - 0.5*_speed -if (_x < 0); - _x =0; - for (i = 20; i >0; i--) { - _x = 0 + _speed - +{ } -void shoot() { - void Ball::init(int size,int speed) { _size = size;