Code Monkey home page Code Monkey logo

dpokerlib's Introduction

DPokerLib

DPokerLib is Poker Library

License: MIT npm version

install

$ npm install dpoker-lib

Usage

Create Deck

var DPokerLib = require('dpoker-lib');

let deck = new DPokerLib.deck.Deck()

Draw One

var DPokerLib = require('dpoker-lib');

let deck = new DPokerLib.deck.Deck()
let card = deck.drawOne()

Get Card Number

var DPokerLib = require('dpoker-lib');

let deck = new DPokerLib.deck.Deck()
let card = deck.drawOne()
let number = card.number

Get Card Mark

var DPokerLib = require('dpoker-lib');

let deck = new DPokerLib.deck.Deck()
let card = deck.drawOne()
let number = card.mark

Check Role

var DPokerLib = require('dpoker-lib');

let deck = new DPokerLib.deck.Deck()

let card1 = deck.drawOne()
let card2 = deck.drawOne()
let card3 = deck.drawOne()
let card4 = deck.drawOne()
let card5 = deck.drawOne()

let handCards = [card1, card2, card3, card4, card5]
let hand = DPokerLib.hand.hand(handCards)

MARK LIST

- SPADE

CARD_MARK.SPADE

- HEART

CARD_MARK.HEART

- DIAMOND

CARD_MARK.DIAMOND

- CLUB

CARD_MARK.CLUB

- JOKER

CARD_MARK.JOKER

Hand List

- Royal Flush

HAND_LIST.ROYAL_FLUSH

- Five Card

HAND_LIST.FIVE_CARD

- Straight Flush

HAND_LIST.STRATIGHT_FLUSH

- Four Card

HAND_LIST.FOUR_CARD

- Full Hause

HAND_LIST.FULL_HAUSE

- Flush

HAND_LIST.FLUSH

- Straight

HAND_LIST.STRAIGHT

- Three Card

HAND_LIST.THREE_CARD

- Two Pair

HAND_LIST.TWO_PAIR

- One Pair

HAND_LIST.ONE_PAIR

- High Card

HAND_LIST.HIGH_CARD

LICENSE

MIT

dpokerlib's People

Contributors

dio0550 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dpokerlib's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.