Aw: Re: Aw: Re: Aw: Re: [stella] Sorting Algorithms.

Subject: Aw: Re: Aw: Re: Aw: Re: [stella] Sorting Algorithms.
From: cybergoth@xxxxxxxx
Date: Mon, 25 Mar 2002 17:38:18 +0100 (MET)
Hi Erik!

> Couldn't you just insert the object at the beginning of the list
> if it's entering at the top of the screen, and insert it at the end of
> the list if it's entering at the bottom of the screen?

Well, I am already using a linked list, so inserting objects would
be as easy possible, as unchaining them from the list.

That'd be fine for any enemy spaceships/shots 
appearing/disappearing anywhere on the screen.

But: Worst case then would be two or more items 
swaping positions. This'd probably result in rebuilding the 
list completely, so I can as well rebuild it always, I think.

Hm... best would be a linked list, that can be reordered with
Bubble Sort... Hm... hm... :-)

(I'm not even sure if finding the *perfect* solution is 
necessary, since I want to limit the objects onscreen 
to a max of 10 anyway, which might already do with
the list I currently do or even Bubble Sort :-))

Greetings,
     Manuel


-----------------------------------------------------------------------
Riester-Rente - Kassieren Sie das Geld vom Staat:
Zum Förderungsrechner! http://www.arcor.de/home/redir.php/riesterrente
-----------------------------------------------------------------------

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread