Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnnyjayjay/poker
A functional implementation of the game mechanics of Texas hold 'em and a Discord bot to play poker in chat
https://github.com/johnnyjayjay/poker
clojure discord discord-bot game hacktoberfest poker
Last synced: 2 months ago
JSON representation
A functional implementation of the game mechanics of Texas hold 'em and a Discord bot to play poker in chat
- Host: GitHub
- URL: https://github.com/johnnyjayjay/poker
- Owner: JohnnyJayJay
- License: other
- Created: 2020-05-25T13:31:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-15T21:21:13.000Z (about 1 year ago)
- Last Synced: 2023-10-16T18:48:16.274Z (about 1 year ago)
- Topics: clojure, discord, discord-bot, game, hacktoberfest, poker
- Language: Clojure
- Homepage:
- Size: 109 KB
- Stars: 13
- Watchers: 2
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# poker
A Clojure implementation of a poker game ([Texas Hold 'em](https://en.wikipedia.org/wiki/Texas_hold_%27em)) and a corresponding Discord bot to play poker in chat.
This is (roughly) how the logic part is used:
```clojure
(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](https://top.gg/api/widget/461791942779338762.svg)](https://top.gg/bot/461791942779338762)
Here are a few impressions of what it looks like:
![](https://i.imgur.com/zGCQoHN.png)
![](https://i.imgur.com/FeJTYD5.png)
![](https://i.imgur.com/yAWQtXn.png)Active work is also being done on translating this bot. More about that at the link below.
Some relevant links:
- [Invite link](https://discord.com/api/oauth2/authorize?client_id=461791942779338762&permissions=329792&scope=bot) to add the public version hosted by myself to your Discord server
- [Support server](https://discord.gg/npEXyQt) for chatter, bug reports and suggestions
- [How to host this bot yourself](./doc/host.md)
- [How to help with translation](./doc/i18n.md)## 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