CharlieHess / slack-poker-bot

A bot that deals Texas Hold'em games in Slack
MIT License
1.66k stars 206 forks source link

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

Open innocentjulie opened 8 years ago

innocentjulie commented 8 years ago

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!