Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why my code won't escape the time out? #72

Open
innocentjulie opened this issue Aug 3, 2016 · 0 comments
Open

Why my code won't escape the time out? #72

innocentjulie opened this issue Aug 3, 2016 · 0 comments

Comments

@innocentjulie
Copy link

the operation of .where .map .where. does not work! In your PlayerInteraction.js line 63 for interaction
//mine
var userAction = rx.Observable.fromEvent(room.getEmitter(),'userOperation',function(data){ console.log(data);return data;});
//playerAction.subscribe(x=>console.log(x));
var playerAction = userAction.where(function(e) {return e.user == player.uid;})
.map(function(e) {return that.actionFromMessage(e, availableActions);} )
.where(function(action) {return action != null;}).publish();
playerAction.connect();

// yours
let playerAction = messages.where(e => e.user === player.id)
.map(e => PlayerInteraction.actionFromMessage(e.text, availableActions))
.where(action => action !== null)
.publish();

playerAction.connect();

@stephenyeargin @gangstead @minalecs @CharlieHess Please help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant