@Override
	public void gerenciaMsgsTCP(String msg){

		if(msg.startsWith(PREFIX_RESPONSE_PLAYER_INFO)){
			Logger.log("TCP PLAYER INFO: "+msg);
		}else if(msg.startsWith(PREFIX_RESPONSE_NEW_PLAYER)){

			String[] parts = msg.split(" ");
			String name = parts[1];
			String avatar = parts[2];

			addUser(name, avatar); 

		}else if(msg.startsWith(PREFIX_RESPONSE_PLAYER_READY)){

			String[] parts = msg.split(" ");
			int number = Integer.parseInt(parts[1]);

			SnakePlayer snakePlayer = snakePlayers.get(number);

			WaitingArrow wArrow = new WaitingArrow(snakePlayers.get(number).getArrow().getSize());
			wArrow.setColor(players.get(number).getColor());

			snakePlayer.setArrow(wArrow);

		}else if(msg.startsWith(PREFIX_RESPONSE_LOAD_GAME)){
			status = GameStatus.LOADING;
		}else if(msg.startsWith(PREFIX_RESPONSE_START_GAME)){
			status = GameStatus.STARTED;
			
			System.out.println("Game Started!!!");
			
		}else if(msg.startsWith(PREFIX_RESPONSE_FRUIT)){
			
			String[] parts = msg.split(" ");
			
			for(int i=1;i<parts.length;i+=2){
				
				int fx = Integer.parseInt(parts[i]);
				int fy = Integer.parseInt(parts[i+1]);
				
				fruits.add(new SnakeFruit(fx,fy));
				
				Logger.log("OHH Fruit!! "+fx+" "+fy);
			}			
		}else if(msg.startsWith(PREFIX_RESPONSE_FRUIT_ATE)){
			
			System.out.println("Ate Fruit");
			
			String[] parts = msg.split(" ");
			int index = Integer.parseInt(parts[1]);
			
			fruits.remove(index);
			
			//new Fruit
			int fx = Integer.parseInt(parts[2]);
			int fy = Integer.parseInt(parts[3]);
			
			fruits.add(new SnakeFruit(fx,fy));
			
			System.out.println("Ate Fruit");
			
		}
	}