public void diffuse(int val, int cx,int cy)
        {//                         centerX,centerY
            //Diffusal slope is always one
            if (val==0) return;
            boolean negative=(val<0);
            if (negative)
                val=-val;
            int endX=Util.lowest(cx+val,Square.xAmt());
            int endY=Util.lowest(cy+val,Square.yAmt());
            int startY=Util.highest(cy-val+1, 0);
            for (int x=Util.highest(cx-val+1,0);
                    x<endX;   ++x)
            {
                int curVal=val-Util.gridDistance(cx, cy, x, startY);
                for (int y=startY;y<endY;++y)
                {
                    if (curVal>0) {
                        if (negative)
                            value[x][y]-=curVal;
                        else
                            value[x][y]+=curVal;
                    }
                    if (y<cy)
                        curVal--;
                    else
                        curVal++;
                }
            }
        }