public void move()
    {
        for(int z = numberOfDots; z > 0; z--)
        {
                x[z] = x[(z - 1)]; y[z] = y[(z - 1)];
        }

        if (leftDirection)  x[0] -= DOTSIZE;
        if (rightDirection) x[0] += DOTSIZE;
        if (upDirection) y[0] -= DOTSIZE;
        if (downDirection) y[0] += DOTSIZE;	
    }