Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 527 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 527 Bytes

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);