//	TonesGlobalData.h - Class holding the game's global data.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  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 TONESGLOBALDATA_H_
#define TONESGLOBALDATA_H_

#include "GameCounter.h"
#include "GlobalData.h"
#include "HighScore.h"

///	Class holding the game's global data.
class TonesGlobalData : public GlobalData
{
  public:
	///	Constructor.
	TonesGlobalData();
	///	Destructor.
	~TonesGlobalData();

	///	Sets pure mode.
	void setPure(bool val);
	///	Sets zen mode.
	void setZen(bool val);
	///	Sets low mode.
	void setLow(bool val);

	///	Returns whether pure mode is on or not.
	bool getPure() const {return pure;};
	///	Returns whether zen mode is on or not.
	bool getZen() const {return zen;};
	///	Returns whether low mode is on or not.
	bool getLow() const {return low;};

	///	Updates the Challenge scores.
	void updateChallengeScores(int val);
	///	Updates the Time Attack scores.
	void updateTimeAttackScores(int val);

	///	Returns the challenge high score.
	int getChallengeHighScore() const {return highScore.getChallengeHighScore();};
	///	Returns the challenge last score.
	int getChallengeLastScore() const {return highScore.getChallengeLastScore();};
	///	Returns the time attack high score.
	int getTimeAttackHighScore() const {return highScore.getTimeAttackHighScore();};
	///	Returns the time attack last score.
	int getTimeAttackLastScore() const {return highScore.getTimeAttackLastScore();};

	///	Returns the GameCounter instance.
	shared_ptr<GameCounter>& getCounter() {return gameCounter;};
  private:
	///	The GameCounter instance for the game.
	shared_ptr<GameCounter> gameCounter;

	///	Whether to play in pure mode or not.
	bool pure;
	///	Whether to play in zen mode or not.
	bool zen;
	///	Whether the tones are an octave down or not.
	bool low;

	///	The high scores.
	HighScore highScore;
};

typedef shared_ptr<TonesGlobalData> TonesGlobalDataPtr;

#endif
