#pragma once

#include "rpplayer.h"

//##########################################################################
//###########################    Crusher     ################################
//##########################################################################
class Crusher:
	public RPPlayer
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Shared Data support
//
public:
	static Derivation *GetClassDerivations();
	static SharedData DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Message Support
//
private:
	static const HandlerEntry MessageHandlerEntries[];

protected:
	//static MessageHandlerSet MessageHandlers;
	static MessageHandlerSet& GetMessageHandlers();

public:
	void
		DropZoneReplyMessageHandler(DropZone__ReplyMessage *message);
	void
		ScoreZoneReplyMessageHandler(ScoreZone__ReplyMessage *message);
	void
		ScoreMessageHandler(RPPlayer::ScoreMessage *message);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Model Support
//
public:

	typedef void
		(Crusher::*Performance)(Scalar time_slice);

	void
		SetPerformance(Performance performance)
		{
			Check(this);
			activePerformance = (Simulation::Performance)performance;
		}

	void
		PlayerSimulation(Scalar time_slice);

	RPPlayer
		*teamRunner,
		*enemyRunner;

	void
		InitTeamRunner();

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction and Destruction
//
public:
  static Crusher*
		Make(MakeMessage *creation_message);

	Crusher(
		MakeMessage *creation_message,
		SharedData	&shared_data = DefaultData
	);
	~Crusher();

	Logical
  	TestInstance() const;

void
		AddOffensivePlayer(OffensivePlayer &offensive_player);

	void
		PointVTVTowardGoal();
};
