Bug with ArrayList

i am not able to follow your code, like the “k” thing…
but i see that you first make a

momPos.add

( using what points??? )
and later a

points.remove(i-1);

sounds wrong,
after remove need a
rebuild_momPos();