/****************************Project*******************************
 * This Project is called "Sudoku Assistant" It provides a Sudoku 
 * 9x9 grid for the player to solve Sudoku puzzels. I provide tool
 * options for the player like error detection and valid number 
 * identification. This program is not ment to solve Sudoku puzzels
 * by itself but rather augment a human player's ability yo solve the
 * puzzel. The Program will also have the ability to store puzzels 
 * previously solved by the player and rehash the numbers to make it seem 
 * a new puzzel.
 * 04/21/05
 * By:
 * Wilson Saunders
 ******************************File********************************
 * I am the World class I have meathods of rendering an internal grid
 * aswell as storage for game options and user controll.
 * 
 * This File Was Written:
 * 04/21/05
 * By:
 * Wilson Saunders
 ******************************************************************/


#include <allegro.h>
#include "grid.h"
#include "depGrid.h"

#ifndef __WORLD_H__
#define __WORLD_H__


class World{
public:
	Grid * myGrid;
	Grid * myUndo;
	DepGrid *myDepGrid;

	BITMAP * DrawBuffer;
	BITMAP * Lock;
	BITMAP * Undo;
	BITMAP * Clear;
	PALETTE palette;

	BITMAP * ink;
	BITMAP * pencil;
	BITMAP * note;
	BITMAP * arrow;
	BITMAP * temp;

	bool numdown[10];
	bool mousedown;
	bool error[81];
	bool oneleft[81];
	bool search[81];

	bool notes[81][10];

	int cursearch;
	int curloc;


	
public:
	World();
	~World();

	void Update();
	void Draw();

	bool ChkOneLeft(int lco);
	bool ChkConflict(int loc);
	bool ChkSearch(int loc);
	
	void DrawLines();
	void DrawNumbers();
	void DrawNumAt( int X, int Y, int val );


};

#endif