Original Post
Hi all, I writing a small game in java & openGL (hope its the forum to ask). The game is represents by 'World' class, which holds fields Board & Player. When the player finishes the level (i.e he visited each square on the board), he should continue to the next level (new board). I use animator class (FPS animator) in order to animate the game. When the player finished the level, I replace the current board with a new board with different fields (size,color). Probably, because the animator uses several threads, I get exceptions which relate to the old board, i.e out of bounds exceptions. How do I stop all the other threads and update the new board atomically? I tried to stop the animator, but unfortunatly, the others threads still running (excpetions are thrown gracefully :) Do you have any suggestions? Thanks & Good day