CField.hh
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CFIELD_HH_
00018 # define CFIELD_HH_
00019
00020 # include "CPlayer.hh"
00021 # include "Field.hh"
00022
00023
00024 struct ScoreCoord;
00025
00030 class CField : public Field<CPlayer>
00031 {
00032 public:
00033 CField();
00034 ~CField();
00035
00041 const CoordList& getPath(const Coordinates& start,
00042 const Coordinates& dest,
00043 CPlayer* p);
00044
00045 private:
00046 bool getMinPath(int team_id);
00047 ScoreCoord* extractMin();
00048 int getScoreModifier(const ScoreCoord& cur,
00049 const ScoreCoord& prev,
00050 int team_id);
00051
00052
00053 CoordList path_;
00054 ScoreCoord* path_tab_;
00055 std::multimap<int, ScoreCoord*> cur_pt_list_;
00056 ScoreCoord* goal_;
00057 };
00058
00059 #endif