I’m trying to build an algorithm in java, which in ugly way looks like this:
while (true) {
Point p; //a point given in the class constuctor.
p.x+=1*factor;
checkColor(p); // a function that returns true or false for a pixel color.
p.y+=1*factor;
checkColor(p);
p.x-=2*factor;
checkColor(p);
p.y-=*factor;
... ...
}
This will use a int factor; that will increase every cycle in the loop,
but my point is if there is a way to store a ‘line of actions’ that will be executed 1 line at a time, when I call a a function.
what about doing something like this:
what you actually want to do is not easy to understand from the question it
self.