public boolean loadGame(boolean[][] givenCells, int[][] allFilledCells)
	{
		initialGrid = new int[SudokuFrontEnd.colCount][SudokuFrontEnd.rowCount];
		partialSolvedGrid = new int[SudokuFrontEnd.colCount][SudokuFrontEnd.rowCount];
		boolean[][] cellsLocked = new boolean[SudokuFrontEnd.colCount][SudokuFrontEnd.rowCount];
		Point cell;
		for (int i = 0; i < SudokuFrontEnd.cellCount; i++)
		{
			if (givenCells[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] == true)
			{
				initialGrid[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] = allFilledCells[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount];
				cellsLocked[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] = true;
			}
			else
			{
				cellsLocked[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] = false;
			}
			if (allFilledCells[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] != 0)
			{
				partialSolvedGrid[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount] = allFilledCells[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount];
			}
			
		}
		//Creates a solition based on given values fom saved game.
		//Checks for validty of loaded values 
		if (SudokuLibrary.oneUniqueSolution(0, initialGrid))
		{
			solvedGrid = SudokuLibrary.solve(0, initialGrid);
			for (int i = 0; i < SudokuFrontEnd.cellCount; i++)
			{
				cell = new Point(i % SudokuFrontEnd.colCount, i / SudokuFrontEnd.rowCount);
				gridInterface.setCellData(partialSolvedGrid[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount], cell);
				if (cellsLocked[i % SudokuFrontEnd.colCount][i / SudokuFrontEnd.rowCount])
				{
					gridInterface.setCellLocked(true, cell);
				}
				if (SudokuLibrary.isWin(gridInterface.getCellsData()))
				{
					for (int j = 0; j < SudokuFrontEnd.cellCount; j++)
					{
						Point p = new Point(j % SudokuFrontEnd.rowCount, j / SudokuFrontEnd.colCount);
						gridInterface.setCellHighlighted(true, p);
					}
				}
				else
				{
					if (SudokuLibrary.isLegal(cell, gridInterface.getCellData(cell), gridInterface.getCellsData()))
					{
						gridInterface.setCellError(false, cell);
					}
					else
					{
						gridInterface.setCellError(true, cell);
					}
				}
			}
			return true;
		}
		return false;
	}