<commit_before>/* TODO: - Handle scenario where everyone always draws a card and never plays
 *         until all drawpile cards are gone, then a player plays a draw2 or
 *         wild4.
 *       - Implement computer player (difficulty levels?)
 *       - Actually take advantage of 'game' property of Player instead
 *         of regular for-loop searches for game associated with a player
 *       - How to handle a game owner quitting? Auto-assign ownership to the next
 *         player in the list or destroy the game (ejecting everyone)?
 */

var util = require('util'), EventEmitter = require('events').EventEmitter,
    common = require('./common');

var MAX_POINTS = 1,
    MAX_GAME_NAME_LEN = 20,
    MAX_PLAYER_NAME_LEN = 30,
    NUM_CARDS_START = 1,
    CARD_TYPE = common.CARD_TYPE,
    CARD_VALUE = common.CARD_VALUE,
    CARD_POINTS = common.CARD_POINTS;

function makeDeck() {
  var cards = new Array(108);
  var c = 0;

  // Add colored cards
  for (var i=0; i<CARD_TYPE.WILD; ++i) {
    cards[c++] = new Array(i, 0);
    for (var val=1; val<10; ++val)
      cards[c++] = new Array(i, val);
    for (var val=1; val<10; ++val)
      cards[c++] = new Array(i, val);
    for (var j=0; j<2; ++j) {
      cards[c++] = new Array(i, CARD_VALUE.DRAW2);
      cards[c++] = new Array(i, CARD_VALUE.REVERSE);
      cards[c++] = new Array(i, CARD_VALUE.SKIP);
    }
  }

  // Wild cards
  for (var i=0; i<4; ++i) {
    cards[c] = new Array();<commit_msg>Update game manager TODO and revert max game points and number of initial cards back to what they should be<commit_after>/* TODO: - Handle scenario where everyone always draws a card and never plays
 *         until all drawpile cards are gone, then a player plays a draw2 or
 *         wild4.
 *       - Implement computer player (difficulty levels?)
 */

var util = require('util'), EventEmitter = require('events').EventEmitter,
    common = require('./common');

var MAX_POINTS = 500,
    MAX_GAME_NAME_LEN = 20,
    MAX_PLAYER_NAME_LEN = 30,
    NUM_CARDS_START = 7,
    CARD_TYPE = common.CARD_TYPE,
    CARD_VALUE = common.CARD_VALUE,
    CARD_POINTS = common.CARD_POINTS;

function makeDeck() {
  var cards = new Array(108);
  var c = 0;

  // Add colored cards
  for (var i=0; i<CARD_TYPE.WILD; ++i) {
    cards[c++] = new Array(i, 0);
    for (var val=1; val<10; ++val)
      cards[c++] = new Array(i, val);
    for (var val=1; val<10; ++val)
      cards[c++] = new Array(i, val);
    for (var j=0; j<2; ++j) {
      cards[c++] = new Array(i, CARD_VALUE.DRAW2);
      cards[c++] = new Array(i, CARD_VALUE.REVERSE);
      cards[c++] = new Array(i, CARD_VALUE.SKIP);
    }
  }

  // Wild cards
  for (var i=0; i<4; ++i) {
    cards[c] = new Array();
{'fraction_non_alphanumeric': 0.13617960986382038, 'fraction_numerical': 0.019138755980861243, 'mean_word_length': 2.888412017167382, 'pattern_counts': {'":': 0, '<': 13, '<?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': '1918558', 'n_tokens_mistral': 977, 'n_tokens_neox': 948, 'n_words': 299}