//	World1.h - One of the worlds.
//  ----------------------------------------------------------------------------
//	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 World1_H_
#define World1_H_

#include "World.h"

///	One of the worlds.
class World1 : public World
{
  public:
	///	Constructor.
	World1();
	///	Destructor.
	~World1();

	///	Handles mouse input for this world.
	void mouseMove(const TwoFloats& pos);
	///	Returns true when it's time to move to the next world.
	bool worldDone() {return done;};
  private:
	///	Called for every draw frame.
	void subclassTick();

	///	Helper method. Calculates the colours according to the mouse position.
	void calcColours();

	///	The latest mouse position.
	TwoFloats mousePos;
	///	The position of the correct colours.
	TwoFloats correctPos;

	///	The various outer colours.
	ThreeFloats outerCols[2][3];
	///	The various middle colours.
	ThreeFloats middleCols[2][3];
	///	The various inner colours.
	ThreeFloats innerCols[2][3];

	///	True when the player's solved the puzzle.
	bool done;
};

#endif
