While loop bug? Stuck on empty

There is nothing inside the while loop to change nextMove to true so if it is false when we reach the loop then program execution it stays indie the loop. The only way out is if it is changed in another thread.