10.03.2015, 04:06
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);