packages/server/lib/game-managers/choice-provider/rock-paper-scissors.js
function restartGame(players) {
    // Replace the current instance with a new instance
    let newGame = new RockPaperScissors(game, players, winCounter, id);
    proxy.swap(newGame);

    q.delay(RESULTS_DELAY)
      .done(function() {
        deferred.resolve(newGame.handleIt(callbacks));
      });
  }
function restartGame(players) {
    // Replace the current instance with a new instance
    let newGame = new RockPaperScissors(game, players, winCounter, id);
    proxy.swap(newGame);

    q.delay(RESULTS_DELAY)
      .done(function() {
        deferred.resolve(newGame.handleIt(callbacks));
      });
  }
function restartGame ( players ) { // Replace the current instance with a new instance let newGame = new RockPaperScissors ( game , players , winCounter , id ) ; proxy . swap ( newGame ) ; q . delay ( RESULTS_DELAY ) . done ( function ( ) { deferred . resolve ( newGame . handleIt ( callbacks ) ) ; } ) ; }
Starts a new game of RPS with the given array of players. A delay is added so that the client has time to show the results to the user.
Starts a new game of RPS with the given array of players . A delay is added so that the client has time to show the results to the user .