00001 /* 00002 ** TowBowlTactics, a turn-based strategy football game. 00003 ** 00004 ** Copyright (C) 2006-2010 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 beginAction(enum eAction action); 00036 00038 int move(const Coordinates& to); 00039 00041 int standUp(); 00042 00044 int block(CPlayer* opponent); 00045 00047 int foul(CPlayer* opponent); 00048 00050 int handoff(const CPlayer* target); 00051 00053 int pass(const Coordinates& to); 00054 00056 void setCoordinates(const Coordinates& coord); 00057 00059 int getPlayerShift() const; 00060 00062 const std::string& getPlayerPicture() const; 00063 00064 // Called by CPlayerMsg. 00065 void msgPlayerCoord(const MsgPlayerCoord* m); 00066 void msgPlayerMove(const MsgMove* m); 00067 void msgStandUp(const MsgStandUp* m); 00068 void msgBlock(const MsgBlock* m); 00069 void msgFoul(const MsgFoul* m); 00070 void msgHandOff(const MsgHandOff* m); 00071 void msgPass(const MsgPass* m); 00072 void msgPlayerKnocked(const MsgPlayerKnocked* m); 00073 void msgPlayerMaRemain(const MsgPlayerMaRemain* m); 00074 void msgPlayerStatus(const MsgPlayerStatus* m); 00075 void msgSkill(const MsgSkill* m); 00076 00077 private: 00078 CRules* r_; 00079 00080 // for graphic UI. 00081 int player_shift_; 00082 std::string player_picture_; 00083 }; 00084 00085 #endif /* !CPLAYER_HH_ */
1.6.3