Catalog npm
Back to packageRELEASE DETAILS

1.12.1

npm

1game-texas-holdem

Texas Hold'em developed in NodeJS by 1game

1gametexas hold'em1game-texasholdem
Published15 Jul 2016
Direct dependencies16
Transitive dependenciesNot calculated

README

Current package documentation

Texas Hold'em by 1game

Travis Build Github Release

Installation

npm i 1game-texas-holdem --save

Usage

import the library

var th = require('1game-texas-holdem');

starts a sample game

// sample game supports 0-11 players
var numOfPlayers = 5;
// API - `sample`
var new_sample = th.sample(numOfPlayers);
// reveal the Board
// sample game stores the Board as an array of 5 Cards.
var board = new_sample.board;
console.log('The Board: ', board);
// reveal the players' Hands
// sample game stores the players' Hands in a two-dimensional array.
var hands = new_sample.hands;
console.log('The Hands: ', hands);
// reveal the 5th Player's Hands
var playerIndex = 4;
var pHands = [ hands[0][playerIndex], hands[1][playerIndex] ];
console.log('The 5th Player\'s Hands: ', pHands);

counting

// after you retrieve the Hands and the Board.
// API - `rule` -> `count`
var input = pHands.concat(board);
var output = th.rule.count(input);
// show what the player hits
console.log(output.rank);
// show the related indexs of the `best` five cards.
console.log(output.ix);
// construct the value string
var val = th.rule.value(input, output);
console.log(val);

API

poker

  • SuitNames (Suits' Names)
  • StSuitNames (ShortNames for SuitNames)
  • RankNames (Ranks' Names)
  • StRankNames (ShortNames for RankNames)
  • Suits (4 Suits)
  • Ranks (13 Ranks from Ace to Two)
  • Deck (52 Cards in initial order)
  • Card (Card prototype)
  • Rank (Rank prototype)

rule

  • count (5 to 7 card hands evaluation)
  • rankings (Names for Hand Ranks)
  • value

sample

a simple game structure 

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 16

Native requirements
16 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
babel-cli
Environment
{
  "local_name": "babel-cli",
  "alias": false,
  "peer_metadata": null
}
^6.10.1development
babel-loader
Environment
{
  "local_name": "babel-loader",
  "alias": false,
  "peer_metadata": null
}
6.2.4development
babel-preset-es2015
Environment
{
  "local_name": "babel-preset-es2015",
  "alias": false,
  "peer_metadata": null
}
^6.9.0development
babel-preset-stage-2
Environment
{
  "local_name": "babel-preset-stage-2",
  "alias": false,
  "peer_metadata": null
}
^6.11.0development
babel-register
Environment
{
  "local_name": "babel-register",
  "alias": false,
  "peer_metadata": null
}
^6.9.0development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
3.5.0development
commitizen
Environment
{
  "local_name": "commitizen",
  "alias": false,
  "peer_metadata": null
}
2.8.2development
cz-conventional-changelog
Environment
{
  "local_name": "cz-conventional-changelog",
  "alias": false,
  "peer_metadata": null
}
1.1.6development
ghooks
Environment
{
  "local_name": "ghooks",
  "alias": false,
  "peer_metadata": null
}
^1.2.4development
json-loader
Environment
{
  "local_name": "json-loader",
  "alias": false,
  "peer_metadata": null
}
0.5.4development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
2.5.3development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
2.3.0development
nyc
Environment
{
  "local_name": "nyc",
  "alias": false,
  "peer_metadata": null
}
^6.6.1development
rimraf
Environment
{
  "local_name": "rimraf",
  "alias": false,
  "peer_metadata": null
}
^2.5.2development
semantic-release
Environment
{
  "local_name": "semantic-release",
  "alias": false,
  "peer_metadata": null
}
^4.3.5development
webpack
Environment
{
  "local_name": "webpack",
  "alias": false,
  "peer_metadata": null
}
1.13.1development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "76c1d6269681d88d881119ee58f0c0595ea38e9a",
  "tarball": "https://registry.npmjs.org/1game-texas-holdem/-/1game-texas-holdem-1.12.1.tgz",
  "integrity": "sha512-zeUJ9dOZ0iuTn1O2xF3fwGtpxAx1RuoM4+RMNKH8nQt19NsLGiIjT1pVzGQHfy1M6DTqFHaVHAFkTGM8G12ClA==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEQCIA08tMwQbZBnS5cwDZnvaVfFJynI4ddg8o0W1PcJQ/8oAiBfTSfN5bxNXZUO0Ki7Xh5FKtbkDHTXh73lNogYW/LxHQ=="
    }
  ]
}

Repository

PENDING
hausenism/1game-texas-holdem

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
hausenzheng/1game-texasholdem

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
hausenism/1game-texasholdem

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:f0ae0c6e245a01fb3d6ca3e18cc0feaaa55e64af4caf2e378e56c1801a596f2e

Other collected versions

1.12.014 Jul1.11.18 Jul1.11.08 Jul1.10.17 Jul1.10.07 Jul1.9.07 JulView all collected versions →