Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

FinderAlg.h

Go to the documentation of this file.
00001 #ifndef HEADER_FINDERALG_H
00002 #define HEADER_FINDERALG_H
00003 
00004 class V2;
00005 class Unit;
00006 
00007 #include "Dir.h"
00008 #include "FinderField.h"
00009 #include "FinderPlace.h"
00010 
00011 #include <deque>
00012 
00013 /**
00014  * Algorithm to find shortest path.
00015  */
00016 class FinderAlg {
00017     private:
00018         const Unit *m_unit;
00019         FinderField m_closed;
00020         std::deque<FinderPlace> m_fifo;
00021     private:
00022         void pushNext(const FinderPlace &parent, const V2 &shift);
00023         bool isInRect(const V2 &rectLoc, int w, int h, const V2 &dest) const;
00024         bool tryPlace(const FinderPlace &place) const;
00025     public:
00026         FinderAlg(int w, int h);
00027         Dir::eDir findDir(const Unit *unit, const V2 &dest);
00028 };
00029 
00030 #endif

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2