CPlayer.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 CPLAYER_HH_
00018 # define CPLAYER_HH_
00019 
00020 # include "Player.hh"
00021 
00022 class CRules;
00023 
00028 class CPlayer : public Player
00029 {
00030 public:
00031   CPlayer(CRules* r, const MsgPlayerCreate* m);
00032   virtual ~CPlayer();
00033 
00035   int declareAction(enum eDeclaredAction action);
00036 
00038   int move(const Position& to);
00039     
00041   int standUp();
00042 
00044   int block(CPlayer* opponent);
00045     
00047   int pass(const Position& to);
00048   
00050   void setPosition(const Position& pos);
00051   
00053   void subMa(int dep);
00054 
00056   int getPlayerPosition() const;
00057 
00059   const std::string& getPlayerPicture() const;
00060 
00061   // Called by CPlayerMsg.
00062   void msgDeclareAction(const MsgDeclare* m);
00063   void msgPlayerPos(const MsgPlayerPos* m);
00064   void msgPlayerMove(const MsgMove* m);
00065   void msgBlock(const MsgBlock* m);
00066   void msgPlayerKnocked(const MsgPlayerKnocked* m);
00067   void msgPlayerStatus(const MsgPlayerStatus* m);
00068   void msgPlayerKO(const MsgPlayerKO* m);
00069   void msgSkill(const MsgSkill* m);
00070 
00071 private:
00072   CRules* r_;
00073 
00074   // for graphic UI.
00075   int player_position_;
00076   std::string player_picture_;
00077 };
00078 
00079 #endif /* !CPLAYER_HH_ */

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