// PlayerArray.h: interface for the PlayerArray class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(COMMON_WORLD_PLAYERARRAY_H)
#define COMMON_WORLD_PLAYERARRAY_H

#include "Common/Support/DynArray.h"
#include "Common/World/Line.h"
#include "Common/World/Abscisse.h"

class Point;
class Player;
class SimPlayer;
class PlayerArray: public DynArray<SimPlayer, 32>
{
public:
	PlayerArray(const PlayerArray& other);
	PlayerArray();
	virtual ~PlayerArray();
	
	// vrati index hraca, ktoreho dres ma cislo uniform; -1 == nenasiel sa
	int FindByUniformIndex(int uniform) const;
	// vrati index hraca, ktory je od pozicie pos vzidleny maximalne o fMaxRadius; -1 == ziaden hrac nie je v danom okoli
	int FindByPosIndex(Point pos, float fMaxRadius=1.0) const;
	// vrati index hraca, ktory je najblizsie k pozicii pos; -1 ak ziaden hrac
	int FindNearestToPosIndex(Point pos);
	bool IsAnyNearLine(Line &l, float maxDist, int &idx);
	bool IsAnyNearAbscisse(const Abscisse &a, float maxDist);

	// SS: Vrati cislo brankara
	int GetGoalieNumber();
};

#include "Common/World/Point.h"
#include "Player/World/Player.h"
#include "Player/World/SimPlayer.h"
#endif // COMMON_WORLD_PLAYERARRAY_H
