It symbolizes the ball, checks all ball manipulations. More...
#include <SBall.hh>
Inheritance diagram for SBall:

Public Member Functions | |
| SBall (SRules *r) | |
| void | setPosition (const Position &pos, bool advertise_client=true) |
| Sets ball position and advertises the client if it changed. | |
| void | setOwner (SPlayer *p) |
| Sets ball owner and advertises the client if it has changed. | |
| void | removeFromField () |
| Removes the ball from the field. | |
| void | bounce (int nb=1) |
| Bounces the ball around. | |
| void | scatter (int nb) |
| Scatters the ball in a random direction. | |
| void | throwIn () |
| Makes spectators throw the ball in the field. | |
| void | setThrown () |
| bool | hasBeenThrown () |
| void | resetTurn () |
| void | sendPosition () |
It symbolizes the ball, checks all ball manipulations.
You will have only one instance of this class at runtime, handled by SRules class.
| void SBall::removeFromField | ( | ) |
Removes the ball from the field.
| void SBall::scatter | ( | int | nb | ) |
Scatters the ball in a random direction.
| nb | Number of squares covered. |
| void SBall::setPosition | ( | const Position & | pos, | |
| bool | advertise_client = true | |||
| ) |
Sets ball position and advertises the client if it changed.
| pos | Where to place the ball. | |
| advertise_client | Whether or not send a MSG_BALLPOS to clients. |
1.4.7