Storing cells in y_iterate.
#6

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
foreach uses the values as indexes, so I think this could work
pawn Код:
new rand = Iter_Random(Frontier[0]));

if(Iter_Next(Frontier[0], rand) == Iter_Size(Frontier[0])) {
    rand = Iter_First(Frontier[0]);
}
RandomCell[0] = Iter_Next(Frontier[0], rand);
RandomCell[1] = Iter_Next(Frontier[1], rand);
Thats almost exactly what I had, but wouldn't you subtract from rand? Doing so would remove the need to loop back to index one.

Anyways, now that that's off my plate I need a way to loop through all cells and store only frontier cells. My current method did not work. If you do not know what I mean go here.
Reply


Messages In This Thread
Storing cells in y_iterate. - by Crayder - 09.03.2015, 18:33
Re: Storing cells in y_iterate. - by oliverrud - 09.03.2015, 20:42
Re: Storing cells in y_iterate. - by Misiur - 09.03.2015, 20:44
Re: Storing cells in y_iterate. - by Crayder - 09.03.2015, 21:17
AW: Storing cells in y_iterate. - by Nero_3D - 10.03.2015, 04:06
Re: AW: Storing cells in y_iterate. - by Crayder - 10.03.2015, 04:14
AW: Re: AW: Storing cells in y_iterate. - by Nero_3D - 10.03.2015, 13:18
Re: Storing cells in y_iterate. - by Misiur - 10.03.2015, 14:36
Re: Storing cells in y_iterate. - by Crayder - 10.03.2015, 21:24

Forum Jump:


Users browsing this thread: 1 Guest(s)