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.
Dependencies: mbed
Diff: Ball/Ball.cpp
- Revision:
- 11:f481ec642cc5
- Parent:
- 10:6c6e09023942
- Child:
- 12:954da4f4e565
--- a/Ball/Ball.cpp Mon Apr 22 17:34:11 2019 +0000 +++ b/Ball/Ball.cpp Mon Apr 22 19:57:01 2019 +0000 @@ -22,28 +22,17 @@ bowled=0; } + int Ball::bowler_start(){ if(_y1!=15){ - _y1++; + _y1+=2; return 0; } else { return 1; } } -Vector2D Ball::get_pos() -{ - Vector2D p = {_x,_y}; - return p; -} - -void Ball::set_pos(Vector2D p) -{ - _x = p.x; - _y = p.y; -} -/* -void Ball::ball_start(N5110 &lcd,int checkHit, Direction dir){ +int Ball::ball_start(){ int bowler_start_check=bowler_start(); if (bowler_start_check==1){ if (_y!=36){ @@ -59,7 +48,7 @@ return 0; } } -*/ + void Ball::draw(N5110 &lcd) { lcd.drawCircle(_x1,_y1,2,FILL_BLACK);