Buggy code:
public class GameRenderer implements ApplicationListener { private static final int NB_JOUEURS = 6 ; private static final int NB_BONUS = 5 ; private static final int NB_SPRITE_LIFEBAR = 2 ; private static final int NB_SPRITE_BLOCKBAR = 7 ; private static final int NB_BLOCK_MAX = 10 ; private static int [ ] posiX ; private static int [ ] posiY ; public static String PATH_IMG = "img//" ; Texture texAvatar ; Texture texBonus ; Texture texLifeBar ; Texture texBlockBar ; private Sprite [ ] bonus ; private Sprite [ ] avatars ; private Sprite [ ] lifeBar ; private Sprite [ ] blockBar ; private Sprite bg ; private Sprite bgWait ; private Sprite cursor ; private SpriteBatch batch ; private SpriteBatch batch2 ; public static int w ; public static int h ; private Communication com ; private int selected = - 1 ; public GameRenderer ( String host , int port ) throws IOException { } public void create ( ) { } public void render ( ) { int nbPa = com . getActions ( ) ; int nbBlock = com . getStones ( ) ; int monId = com . getId ( ) ; int i ; int select = - 1 ; gl . glClear ( GL_COLOR_BUFFER_BIT ) ; if ( ! ( com . isConnected ( ) ) ) { batch . begin ( ) ; bgWait . draw ( batch ) ; batch . end ( ) ; return ; } if ( ( com . getStatus ( ) ) != 0 ) return ; if ( input . isTouched ( ) ) { int x = input . getX ( ) ; int y = input . getY ( ) ; for ( i = 0 ; i < ( GameRenderer . NB_JOUEURS ) ; i ++ ) { if ( collision ( x , ( ( GameRenderer . h ) - y ) , avatars [ i ] . getX ( ) , avatars [ i ] . getY ( ) , avatars [ i ] . getWidth ( ) , avatars [ i ] . getHeight ( ) ) ) { select = i ; } } if ( ( select != ( - 1 ) ) && ( select != ( selected ) ) ) { if ( ( selected ) == ( - 1 ) ) { selected = select ; Log . i ( "setSelected" , ( "<seq2seq4repair_space>new<seq2seq4repair_space>selection<seq2seq4repair_space>:<seq2seq4repair_space>" + ( selected ) ) ) ; } else { Log . i ( "setSelect" , ( "<seq2seq4repair_space>new<seq2seq4repair_space>selection<seq2seq4repair_space>:<seq2seq4repair_space>" + ( selected ) ) ) ; if ( ( selected ) == monId ) { Log . i ( "action" , ( "transfert<seq2seq4repair_space>de<seq2seq4repair_space>pierre<seq2seq4repair_space>du<seq2seq4repair_space>joueur<seq2seq4repair_space>vers<seq2seq4repair_space>" + select ) ) ; com . giveStone ( select ) ; } else if ( select == monId ) { Log . i ( "action" , ( "transfert<seq2seq4repair_space>de<seq2seq4repair_space>pierre<seq2seq4repair_space>vers<seq2seq4repair_space>le<seq2seq4repair_space>joueur<seq2seq4repair_space>de<seq2seq4repair_space>la<seq2seq4repair_space>part<seq2seq4repair_space>de<seq2seq4repair_space>" + select ) ) ; <START_BUG> com . stealStone ( select ) ; <END_BUG> } else { Log . i ( "action" , ( ( ( "action<seq2seq4repair_space>spéciale<seq2seq4repair_space>de<seq2seq4repair_space>" + ( selected ) ) + "vers<seq2seq4repair_space>" ) + select ) ) ; } selected = - 1 ; } } } batch . begin ( ) ; bg . draw ( batch ) ; for ( i = 0 ; i < ( nbPa - 1 ) ; i ++ ) { lifeBar [ 0 ] . setPosition ( ( i * ( lifeBar [ 0 ] . getWidth ( ) ) ) , ( ( graphics . getHeight ( ) ) - ( lifeBar [ 0 ] . getHeight ( ) ) ) ) ; lifeBar [ 0 ] . draw ( batch ) ; } lifeBar [ 1 ] . setPosition ( ( ( nbPa - 1 ) * ( lifeBar [ 1 ] . getWidth ( ) ) ) , ( ( graphics . getHeight ( ) ) - ( lifeBar [ 1 ] . getHeight ( ) ) ) ) ; lifeBar [ 1 ] . draw ( batch ) ; for ( i = 0 ; i < nbBlock ; i ++ ) { blockBar [ monId ] . setPosition ( 10 , ( 5 + ( i * ( ( blockBar [ monId ] . getHeight ( ) ) + 5 ) ) ) ) ; blockBar [ monId ] . draw ( batch ) ; } for ( ; i < ( GameRenderer . NB_BLOCK_MAX ) ; i ++ ) { blockBar [ ( ( GameRenderer . NB_SPRITE_BLOCKBAR ) - 1 ) ] . setPosition ( 10 , ( 5 + ( i * ( ( blockBar [ 0 ] . getHeight ( ) ) + 5 ) ) ) ) ; blockBar [ ( ( GameRenderer . NB_SPRITE_BLOCKBAR ) - 1 ) ] . draw ( batch ) ; } batch . end ( ) ; batch2 . begin ( ) ; avatars [ monId ] . setPosition ( GameRenderer . posiX [ 0 ] , GameRenderer . posiY [ 0 ] ) ; avatars [ monId ] . draw ( batch2 ) ; for ( i = 1 ; i < ( GameRenderer . NB_JOUEURS ) ; i ++ ) { avatars [ posiToId ( i , monId ) ] . setPosition ( GameRenderer . posiX [ i ] , GameRenderer . posiY [ i ] ) ; avatars [ posiToId ( i , monId ) ] . setScale ( 0.8F ) ; avatars [ posiToId ( i , monId ) ] . draw ( batch2 ) ; } if ( ( selected ) != ( - 1 ) ) { cursor . setPosition ( GameRenderer . posiX [ idToPosi ( selected , monId ) ] , GameRenderer . posiY [ idToPosi ( selected , monId ) ] ) ; cursor . draw ( batch2 ) ; } batch2 . end ( ) ; } private void setPositions ( ) { } private void allocTextures ( ) { }

Fix:
com . stealStone ( selected ) ;