https://github.com/creativenull/pokerjs
A simple poker library written in TypeScript
https://github.com/creativenull/pokerjs
card playing-cards poker
Last synced: about 2 months ago
JSON representation
A simple poker library written in TypeScript
- Host: GitHub
- URL: https://github.com/creativenull/pokerjs
- Owner: creativenull
- License: mit
- Created: 2020-06-19T16:39:11.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-21T16:09:20.000Z (over 1 year ago)
- Last Synced: 2024-05-30T16:32:42.439Z (about 1 year ago)
- Topics: card, playing-cards, poker
- Language: TypeScript
- Homepage:
- Size: 322 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Poker.js
A simple card poker library written in TypeScript.
## Installation
```sh
npm install @creativenull/pokerjs
```### Deno
```ts
import { Poker } from "jsr:@creativenull/pokerjs@2";
```## Test
```sh
npm run test
```## Usage
```ts
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);
```