//	DefaultGenerator.h - The basic ToneGenerator.
//  ----------------------------------------------------------------------------
//	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 DEFAULTGENERATOR_H_
#define DEFAULTGENERATOR_H_

#include "../ToneGenerator.h"

///	The basic ToneGenerator.
/*!
	Just generates the three basic Tones (fast, med, slow), and tries to make
	it fair but with a gradually-increasing difficulty.
 */
class DefaultGenerator : public ToneGenerator
{
  public:
	///	Constructor.
	DefaultGenerator();
	///	Destructor.
	~DefaultGenerator();

	///	Called for every frame in the game.
	std::vector<TonePtr>& tick(const std::vector<TonePtr>& tonesInPlay,
							   const std::map<std::wstring, int>& toneTypesInPlay,
							   std::vector<PickupPtr>& pickupsInPlay,
							   int numWarnings,
							   int& numRails,
							   float GlobalSpeed,
							   int maxRailStart,
							   shared_ptr<TonesSounder>& sounder);
  private:
	///	The counter used to determine when to generate new Tones.
	int counter;
	///	So the distance between new Tones being generated decreases with time.
	float countLength;

	///	The vector returned by tick().
	std::vector<TonePtr> tickReturn;
};

#endif
