My delete function isn't deleting anything. I want her to delete only the node that is selected. Here is a part of the code. I'm not seeing what is wrong.
You are using mutually exclusive conditions in the function. Neither node can be simuktaneously for example alone() and last().
It is obvious that your function is invalid.
Oh, sorry. you are applying this condition to different nodes.
But in any case the code invalid because if the node is alone what is the sense to check the current node whether it is last or not?!!!
I think that the function either shall has no parameters or be static.