Line Tower Wars & Linked Lists
Posted: Fri Apr 29, 2016 4:15 pm
Edit: I figured out a solution soon after typing this, but I would still like your suggestions.
Hi 3ICE. I've been looking at ltw 7 lately and I am trying to use it to learn some new stuff. I was wondering how I could correctly setup the leak removal of creeps that exit lanes. Player sending is currently done using a linked list, but it seems that one linked list can't be used to move leaks from one lane to the next. How exactly should I set this up without doing checks to see if the next lane's player is dead or not?
If you haven't played Line Tower Wars 7, then a quick game with more than 2 computer players can teach you how sending works. The computer players will not do anything.
http://www.epicwar.com/maps/95 (Link to map)
An example:
(Lanes)
1 <-> 2 <-> 3 <-> 4 <-> 5 <-> 6 <-> 7 (and then 7 points to 1, and 1 points back to 7)
If lane 6's player dies, then lane 5 now points to 7 and lane 7 points back to lane 5. Lane 6 can still have creeps in it, and these creeps need to move to lane 7 when exiting lane 6.
1 <-> 2 <-> 3 <-> 4 <-> 5 <-> 7
6 -> 7
Now if lane 7 dies, then lane 5 now points to lane 1, and lane 1 points back to lane 5. Any creeps that are still in lane 7 now need to move to lane 1 when exiting lane 7.
1 <-> 2 <-> 3 <-> 4 <-> 5
7 -> 1
6 -> 7
But, if any creeps are still in lane 6 while this is happening, they're told to move to lane 7 (a dead lane now). I need to know how to directly tell lane 6 to send creeps to lane 1 instead of just checking each lane to see if its dead and updating the lane data.
I'm doing this for practice and want to know how this can be achieved.
Hi 3ICE. I've been looking at ltw 7 lately and I am trying to use it to learn some new stuff. I was wondering how I could correctly setup the leak removal of creeps that exit lanes. Player sending is currently done using a linked list, but it seems that one linked list can't be used to move leaks from one lane to the next. How exactly should I set this up without doing checks to see if the next lane's player is dead or not?
If you haven't played Line Tower Wars 7, then a quick game with more than 2 computer players can teach you how sending works. The computer players will not do anything.
http://www.epicwar.com/maps/95 (Link to map)
An example:
(Lanes)
1 <-> 2 <-> 3 <-> 4 <-> 5 <-> 6 <-> 7 (and then 7 points to 1, and 1 points back to 7)
If lane 6's player dies, then lane 5 now points to 7 and lane 7 points back to lane 5. Lane 6 can still have creeps in it, and these creeps need to move to lane 7 when exiting lane 6.
1 <-> 2 <-> 3 <-> 4 <-> 5 <-> 7
6 -> 7
Now if lane 7 dies, then lane 5 now points to lane 1, and lane 1 points back to lane 5. Any creeps that are still in lane 7 now need to move to lane 1 when exiting lane 7.
1 <-> 2 <-> 3 <-> 4 <-> 5
7 -> 1
6 -> 7
But, if any creeps are still in lane 6 while this is happening, they're told to move to lane 7 (a dead lane now). I need to know how to directly tell lane 6 to send creeps to lane 1 instead of just checking each lane to see if its dead and updating the lane data.
I'm doing this for practice and want to know how this can be achieved.