/***************************************************************************
 *   Copyright (C) 2004-2005 by                                            *
 *     Paolo Sacconier   <axa1981@tin.it>                                  *
 *     Francesco Tamagni <minchiahead@hacari.org>                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef GILLOGOALKEEPER_H
#define GILLOGOALKEEPER_H

#include "entity.h"
#include "goal.h"
#include "simpleball.h"

namespace gillo {

/**
Yes, we have a goalkeeper!

@author Paolo Sacconier
*/
class Goalkeeper : public Entity
{
	static const double weight;
	static const double radius;
	static const double operativeRadius;
	static const double aimingRadius;
	static const double posCorrIntensity;
	static const double rotCorrIntensity;
	static const float maxMagnetIntensity;
	
	dJointID jam;
	dJointGroupID jid;
	Goal& goal;
	SimpleBall& ball;

public:
    Goalkeeper(Context& c, Goal& g, SimpleBall& b);

    ~Goalkeeper();

	void update(float dt);
	void move(Move m);

};

};

#endif
