5 releases
0.2.3 | Mar 7, 2023 |
---|---|
0.2.2 | Nov 11, 2022 |
0.2.1 | Sep 21, 2022 |
0.2.0 | May 31, 2020 |
0.1.0 | May 31, 2020 |
#109 in Games
39 downloads per month
35KB
815 lines
@giocoacartebot
A Telegram bot to play card games
To find out how to implement new games search for the crate docs on docs.rs
lib.rs
:
Card Games
This crate provide several card games that can be conveniently accessed through a shared set of primitives.
Adding your game
To add your game you have to:
- Fork the repo
- Create a new file under
games/src/games
named after the game - Create a public
struct
representing your game and implementing theDefault
and theGame
traits- Most of the methods are documented, but the main one is
handle_move
which updates the game status according to the card recieved
- Most of the methods are documented, but the main one is
- Export your game in
games/src/games/mod.rs
- Implement some tests
- Open a pull request on the main repo
Dependencies
~3MB
~64K SLoC