Skip to content

A simple poker library written in TypeScript

License

Notifications You must be signed in to change notification settings

creativenull/pokerjs

Repository files navigation

Poker.js

A simple card poker library written in TypeScript.

Installation

npm install @creativenull/pokerjs

Deno

import { Poker } from "jsr:@creativenull/pokerjs@2";

Test

npm run test

Usage

import { Poker } from "@creativenull/pokerjs";

const poker = new Poker();
const player1 = { id: "player1", hand: poker.getPlayerHand() };
const player2 = { id: "player2", hand: poker.getPlayerHand() };

const winner = poker.winner([player1, player2]);
console.log(winner);