Catalog npm
Back to packageRELEASE DETAILS

1.10.0

npm

1game-texas-holdem

1game-TexasHoldEm

1game-texasholdem1gametexas hold'em
Published7 Jul 2016
Direct dependencies13
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 13

Native requirements
13 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
validate.js
Environment
{
  "local_name": "validate.js",
  "alias": false,
  "peer_metadata": null
}
0.10.0runtime
babel-cli
Environment
{
  "local_name": "babel-cli",
  "alias": false,
  "peer_metadata": null
}
^6.10.1development
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
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
2.5.3development
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

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "3b4f896e3c258b30a0269ea7b1001024714f74ab",
  "tarball": "https://registry.npmjs.org/1game-texas-holdem/-/1game-texas-holdem-1.10.0.tgz",
  "integrity": "sha512-Qsnl7Djg1gCCI8s3ZDqunxvCqV9Jf3+YoXPW5EU/TIgAkfRKSW58mkfjxlZUQDAjH4++9mpN5l/46DN8eqg08w==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIF9jeeyMXZy+q5AtYoa12/07LIhCwwWOHcGH59wUJXIXAiEAqEIr8wLJODyOwzP+UfU34OjZJzyEYwdmx9l+SinovxY="
    }
  ]
}

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:f50fcf0e54c2ed223320fd61fe0490c4d07d67ea8b2234d6dff63dcf382faaf7

Other collected versions

1.12.115 Jul1.12.014 Jul1.11.18 Jul1.11.08 Jul1.10.17 Jul1.9.07 JulView all collected versions →