Something like
if(condition1){
move(3);
}else{
move(-3);
}
The object should go right a little bit then left a little bit. Almost like it's bouncing of invisible borders. I'm planning to do this with many objects of a certain class so I don't want them to overlap.

