Ball.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 **
00004 ** Copyright (C) 2006 The TBT Team.
00005 **
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 **
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 **
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
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_

Generated on Sat Jun 23 16:07:22 2007 for Stechec/TBT by  doxygen 1.4.7