Skip to content

tsvikas/hanagram

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

357 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hanagram

Tests uv Ruff Black codecov
Made Using tsvikas/python-template GitHub Discussion PRs Welcome

Overview

Telegram bot to play Hanabi with your friends.

Note

Due to telepot dropping support, this project doesn't works for python >= 3.12

Usage

  • Get an API TOKEN from @BotFather
  • Save to the .env file:
cp .env-sample .env
nano .env  # set the API TOKEN

And run the server with uv

uv run play-telegram

Telegram game

How to play a Telegram game:

  • Add the bot to a telegram group.
  • All players should start a private chat with the bot. Send /link_for_newbies to help them do it.
  • Send /new_game in a group chat to create a new game.
  • Users can now join the game with the Join button displayed.
  • When everyone joined, send /deal_cards to start playing!

Alternatively:

  • Send /test <number-of-players> in a private chat.

Local game

How to play a local game. Let's say players are Alice, Bob and Casey.

  • Run uv run play-repl Alice Bob Casey
  • On each turn, type one of those actions:
    • play <index of card to play>
    • discard <index of card to play>
    • hint <player name to hint> <color or value>

Contributing

Interested in contributing? See CONTRIBUTING.md for development setup and guideline.

About

Telegram bot to play Hanabi with your friends.

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 89.1%
  • Just 10.4%
  • Dockerfile 0.5%