@Override
    public int processMessage(String msg) {
        String[] action = msg.split(":");
        if(!players[player].getId().equals(action[0])) {
            return 0;
        }
        if ( canPlay() ) {
            String[] pos = action[1].split(",");
            int x = 0, y = 0;
            if ( pos.length != 2)
                return 0;
            
            
            x = Integer.parseInt(pos[0].trim());
            y = Integer.parseInt(pos[1].trim());
            
            if ( x < 0 || x > 2 || y < 0 || y > 2 || grid[x][y] == 'X' || grid[x][y] == 'O')
                return 0;
            
            grid[x][y] = symbols[player];
            return 1;
        }
        
        return 0;
    }