<commit_before>var player = require('./lib/player');
var q = require('q');

function createGame(params, callback) {
  var gameId = params.gameId;
  return q(gameId)
  .then(function (gameId) {
    var game = {
      gameId: gameId,
      players: {},
      turns: {
        count: 0,
        order: [],
        rounds: 1
      }
    };

    return game;
  })
  .nodeify(callback);
}

function joinGame(game, params, callback) {
  var playerId = params.playerId;

  return q({<commit_msg>refactor using the game module<commit_after>var game = require('./lib/game');
var player = require('./lib/player');
var q = require('q');

function createGame(params, callback) {
  var gameId = params.gameId;
  return q(gameId)
  .then(game.createGame)
  .nodeify(callback);
}

function joinGame(game, params, callback) {
  var playerId = params.playerId;

  return q({
{'fraction_non_alphanumeric': 0.14602803738317757, 'fraction_numerical': 0.002336448598130841, 'mean_word_length': 3.180487804878049, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5570920', 'n_tokens_mistral': 284, 'n_tokens_neox': 280, 'n_words': 70}