00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _BALL_HH_
00018 # define _BALL_HH_
00019
00020 # include "Constants.hh"
00021 # include "PacketHandler.hh"
00022
00030 DECLARE_PACKET(MSG_BALLPOS, MsgBallPos)
00031 int row;
00032 int col;
00033 END_PACKET
00034
00042 DECLARE_PACKET(MSG_GIVEBALL, MsgGiveBall)
00043 int player_id;
00044 END_PACKET;
00045
00050 template <typename T>
00051 class Ball
00052 {
00053 public:
00054 Ball();
00055 virtual ~Ball();
00056
00058 const Position& getPosition() const;
00060 void setPosition(const Position& pt);
00061
00063 T* getOwner() const;
00065 void setOwner(T* player);
00066
00067 protected:
00068 Position pos_;
00069 T* owner_;
00070 };
00071
00072 # include "Ball.hxx"
00073
00074 #endif // !_BALL_HH_