 the new stack
        function setStack(obj, s)
            obj.stack = s;
        end
        
        %% indexOf
        % Return the position in the stack of coordinates (_x_, _y_), or -1
        % if they do not exist. Also returns -1 if the stack is empty.
        %
        % *Parameters*
        %
        % |x|: x coordinate
        %
        % |y|: y coordinate
        %
        % *Returns*
        %
        % |clicked|: position of the coordinate, or -1 if it does not exist
        function clicked