Skip to content

A functional implementation of the game mechanics of Texas hold 'em and a Discord bot to play poker in chat

License

Notifications You must be signed in to change notification settings

JohnnyJayJay/poker

Repository files navigation

poker

A Clojure implementation of a poker game (Texas Hold 'em) and a corresponding Discord bot to play poker in chat.

This is (roughly) how the logic part is used:

(require '[poker.logic.game :as poker]
         '[poker.logic.core :as cards])

(def player-budgets {"Alice" 100 "Bob" 85})
(def game (poker/start-game 10 (keys player-budgets) (shuffle cards/deck) player-budgets))

; Available functions
(poker/possible-moves game)
(poker/call game)
(poker/raise game 20)
(poker/fold game)
(poker/all-in game)

It is currently not published as a library, only used as the backbone for the associated Discord bot.

Bot

Discord Bots

Here are a few impressions of what it looks like:

Active work is also being done on translating this bot. More about that at the link below.

Some relevant links:

License

Copyright © 2020-2022 JohnnyJayJay

This program and the accompanying materials are made available under the terms of the Hippocratic License 2.1 which is available at https://firstdonoharm.dev/version/2/1/license.html

About

A functional implementation of the game mechanics of Texas hold 'em and a Discord bot to play poker in chat

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published