I’ll write it on simple C++. The idea is having a boolean changing its value in every execution of the loop.
bool choseA = true;
while(1){
if(choseA){
// code
choseA = false;
} else {
// code
choseA = true;
}
}
I’ll write it on simple C++. The idea is having a boolean changing its value in every execution of the loop.
bool choseA = true;
while(1){
if(choseA){
// code
choseA = false;
} else {
// code
choseA = true;
}
}