#telegram-bot #card-game #card #bot #telegram

cardgames

A collection of (mostly italians) card games

9 releases

0.2.7 Jan 15, 2025
0.2.6 Nov 18, 2024
0.2.5 Feb 11, 2024
0.2.4 Sep 7, 2023
0.2.0 May 31, 2020

#123 in Games

Download history 2/week @ 2024-11-03 158/week @ 2024-11-17 10/week @ 2024-11-24 1/week @ 2024-12-01 3/week @ 2024-12-08 98/week @ 2025-01-12 20/week @ 2025-01-19 8/week @ 2025-02-02

126 downloads per month

AGPL-3.0

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 the Default and the Game traits
    • Most of the methods are documented, but the main one is handle_move which updates the game status according to the card recieved
  • Export your game in games/src/games/mod.rs
  • Implement some tests
  • Open a pull request on the main repo

Dependencies

~2–2.8MB
~59K SLoC