I have a class MPClient and MultiplayerMatch. MultiplayerMatch, in his constructor, creates a MPClient runnable thread.
To avoid data overflow, I have a boolean named \"
This is because it is reading a cached value of match.moved variable instead of the latest. To avoid this, declare the variable as volatile
match.moved
volatile
public volatile boolean moved;
Read more here