public void click(int x, int y)
    {
        if(x<9*drawSize && y<9*drawSize)
        {
            Cell clickedCell = grid[y/drawSize][x/drawSize];
            if(clickedCell==selectedCell)
            {
                selectedCell.deselect();
                selectedCell = null;
            }
            else
            {
                if(selectedCell!=null)
                {
                    selectedCell.deselect();
                }
                selectedCell = clickedCell;
                selectedCell.select();
            }
        }
    }