public int clearRows()
    {
        int cleared = 0;
        
        for (int i = 0; i < height; i++)
        {
            if(getRowCount(i) >= width)
            {
                cleared++;
                
                for(int j = 0; j < width; j++)
                {
                    System.arraycopy(grid[j], i + 1, grid[j], i, height - 1- i);
                    grid[j][height - 1] = false;
                    colorGrid[j][i] = colorGrid[j][i + 1];	
                }
                
                i--;
            }
        }
        
        return cleared;
    }