packages/server/lib/game-managers/choice-provider/rock-paper-scissors.js
function handleIt(cb) {
    callbacks = cb;
    broadcast = callbacks.broadcast;

    let msg = {
      cmd: MessageType.RockPaperScissors,
      handlerId: id
    };
    broadcast("action", msg);

    // Return a promise for the result
    deferred = q.defer();
    return deferred.promise;
  }
function handleIt(cb) {
    callbacks = cb;
    broadcast = callbacks.broadcast;

    let msg = {
      cmd: MessageType.RockPaperScissors,
      handlerId: id
    };
    broadcast("action", msg);

    // Return a promise for the result
    deferred = q.defer();
    return deferred.promise;
  }
function handleIt ( cb ) { callbacks = cb ; broadcast = callbacks . broadcast ; let msg = { cmd : MessageType . RockPaperScissors , handlerId : id } ; broadcast ( "action" , msg ) ; // Return a promise for the result deferred = q . defer ( ) ; return deferred . promise ; }
Returns a promise for the ID of the player who won the game
Returns a promise for the ID of the player who won the game