#pragma once

#include "crusher.h"

//##########################################################################
//###########################    Blocker     ################################
//##########################################################################
class Blocker:
	public Crusher
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Shared Data support
//
public:
	static Derivation *GetClassDerivations();
	static SharedData DefaultData;

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Message Support
//
private:
	static const HandlerEntry MessageHandlerEntries[];

protected:
	static MessageHandlerSet MessageHandlers;

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

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

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

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

	void
		PlayerSimulation(Scalar time_slice);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction and Destruction
//
public:

  static Blocker*
		Make(MakeMessage *creation_message);

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

	Logical
  	TestInstance() const;

	void
		AddOffensivePlayer(OffensivePlayer &offensive_player);

	
};
