//	FastTone.h - The fast tone type.
//  ----------------------------------------------------------------------------
//	This file is part of 'GameTemplate', template code for a game.
//	Copyright (C) 2011  Niall Moody
//	
//	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 3 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, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef FASTTONE_H_
#define FASTTONE_H_

#include "../ToneCreator.h"
#include "DebugHeaders.h"

//------------------------------------------------------------------------------
///	The fast tone type.
class FastTone : public Tone
{
  public:
	///	Constructor.
	FastTone(int startRail, int startNumRails, TonesSounderPtr& sound);
	///	Destructor.
	~FastTone();

	///	Returns the name of this tone type.
	std::wstring getName() const {return L"FastTone";};
	///	Returns the score you get if this tone makes it to the opposite side of the screen.
	int getScore() const {return 5;};
};

//------------------------------------------------------------------------------
///	The fast tone type ToneCreator.
class FastCreator : public ToneCreator
{
  public:
	///	Constructor.
	FastCreator() {};
	///	Destructor.
	~FastCreator() {};

	///	Constructs this Creator's Tone, returns its pointer.
	TonePtr createTone(int startRail,
					   int startNumRails,
					   TonesSounderPtr& sounder) const
	{
		return TonePtr(NiallNew FastTone(startRail,
										 startNumRails,
										 sounder));
	};

	///	Returns which side of the screen this Tone should start from.
	bool getStartingSide() const {return true;};
	///	Used to make sure the player isn't put in an unfair position.
	int getMinDistanceToOtherTones() const {return 500;};
	///	Used to make sure the player isn't put in an unfair position.
	int getMaxNumOtherTones(const std::wstring& toneType) const
	{
		int retval = -1;

		if(toneType == L"SlowTone")
			retval = 16;
		else if(toneType == L"MedTone")
			retval = 16;
		else if(toneType == L"ReverseTone")
			retval = 1;
		else if(toneType == L"FastTone")
			retval = 3;

		return retval;
	};
	///	Used to make sure the player isn't put in an unfair position.
	int getMaxNumWarnings() const {return 2;};
};

#endif
