_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes | Public Member Functions | List of all members
BestRangeTargetFinder Class Reference

Classes

class  FillBadGood
 

Public Member Functions

 BestRangeTargetFinder (const CUnit &a, const int r)
 
 ~BestRangeTargetFinder ()
 
CUnitFind (std::vector< CUnit * > &table)
 
CUnitFind (CUnitCache &cache)
 

Detailed Description

Attack units in distance, with large missile

Choose the best target, that can be attacked. It takes into account allied unit which could be hit by the missile

Note
This could be improved, for better performance / better trade.
Will be moved to unit_ai.c soon.

Constructor & Destructor Documentation

◆ BestRangeTargetFinder()

BestRangeTargetFinder::BestRangeTargetFinder ( const CUnit a,
const int  r 
)
inline
Parameters
aFind in distance for this unit.
rangeDistance range to look.

◆ ~BestRangeTargetFinder()

BestRangeTargetFinder::~BestRangeTargetFinder ( )
inline

Member Function Documentation

◆ Find() [1/2]

CUnit* BestRangeTargetFinder::Find ( CUnitCache cache)
inline

◆ Find() [2/2]

CUnit* BestRangeTargetFinder::Find ( std::vector< CUnit * > &  table)
inline

The documentation for this class was generated from the following file:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.