This is simple minesweeper-like Telegram game

Overview

Bombsweeper Bot

This is simple minesweeper-like Telegram game. You need to open all "free" squares and put flags on squares with bombs on them. If you open a cell with a bomb, the game is over.

Used technology

  • Python (tested with 3.9, should work on 3.7+);
  • aiogram (Telegram Bot framework);
  • Docker and Docker Compose (containerization);
  • PostgreSQL (database);
  • Redis (persistent storage for some ongoing game data);
  • SQLAlchemy (working with database from Python);
  • Alembic (database migrations made easy);
  • Docker images are built with buildx for both amd64 and arm64 architectures.

Installation

Create a directory of your choice. Inside it, make 3 directories for bot's data:
mkdir -p {pg-data,redis-data,redis-config}

Grab docker-compose-example.yml, rename it to docker-compose.yml and put it next to your directories.

Grab redis.example.conf file, rename it to redis.conf and put into redis-config directory. Change its values for your preference.

Grab env_dist file, rename it to .env and put it next to your docker-compose.yml, open and fill the necessary data.

Finally, start your bot with docker-compose up -d command.

You might also like...
Parkour game made in Python with Ursina Game Engine along with ano0002, Greeny127 and Someone-github Snake game mixed with Conway's Game of Life
Snake game mixed with Conway's Game of Life

SnakeOfLife Snake game mixed with Conway's Game of Life The rules are the same than a normal snake game but you have to avoid cells created by Conway'

Lint game data metafiles against GTA5.xsd for Rockstar's game engine (RAGE)
Lint game data metafiles against GTA5.xsd for Rockstar's game engine (RAGE)

rage-lint Lint RAGE (only GTA5 at the moment) meta/XML files for validity based off of the GTA5.xsd generated from game code. This script accepts a se

HTTP API for FGO game data. Transform the raw game data into something a bit more manageable.

FGO game data API HTTP API for FGO game data. Transform the raw game data into something a bit more manageable. View the API documentation here: https

A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras.

dinoGame A near-exact clone of google chrome's no internet game, or the "google dinosaur game", with some additions and extras. Installation Download

Quantum version of the classical Nim game. An automatic opponent allows to game to not be as easy as it seems.

Nim game Running the game To run the program just launch : python3 game.py Rules This game is inspiring from the Nim game. You are 2 players face to f

Average Clicker Game (AVG) is a Python made game using tkinter

Average-Clicker-Game Average Clicker Game (AVG) is a Python clicker game not made with pygame but with tkinter, it has worker, worker upgrades, times

Ice-Walker-Game - This repository is about the Ice Walker game made in Python.

Ice-Walker-Game Ce dépot contient le jeu Ice Walker programmé en Python. Les différentes grilles du jeu sont contenues dans le sous-dossier datas. Vou

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time

Deal Or No Deal was a very popular game show. Even now, for a family party, it's a fun game to pass time. I made a code to play the game right in your terminal/console. This isn't made to be a game which can be installed by everyone and played, I just made it as a fun project as I just started out with python. So if you have python installed and wanna have some fun, or just curious to see how I did this, feel free to check the code out!

Comments
  • Game logic and callback handling optimizations

    Game logic and callback handling optimizations

    The previous game logic involved multiple iterations over the game field. This PR tries to reduce the number of such iterations to only 1. A new "game analyzer" is built for such purpose; its task is to decide should we finish the game or not.

    Also flag add/remove logic is split to several handlers for readability.

    aiogram version is still 3.0 beta 2.

    opened by MasterGroosha 0
Releases(v2.0)
  • v2.0(Apr 3, 2022)

    Nothing has changed for you, dear players, but the bot itself got a huge upgrade: we've switched from aiogram 2.x to 3.x. And while aiogram 3.x is still in beta, the framework is rather stable to be used in production, and introduces lots of cool things to try.

    No data has been lost, and all your stats are kept. By the way, more than 4000 games have been played already. Thank you!

    For dear developers: be warned, this release has backwards-incompatible changes for config file, so you need to check env_dist file and move your old settings to the new .env file. Also, we've added support for local Bot API in case you want to run the bot under dynamic IP address on webhooks.

    Source code(tar.gz)
    Source code(zip)
  • v1.7(Sep 9, 2021)

    Introducing personal statistics! Use the new /stats command and see how many games you played, grouped by field size. Also, see your winrate and tell friends who's the best bombsweeper in town! изображение

    Source code(tar.gz)
    Source code(zip)
  • v1.6(Sep 7, 2021)

  • v1.5(Sep 5, 2021)

    With this release, you can open the whole block of cells if you click of the unoccupied one. No more "click all those zeros" routine!
    Speaking about zeros... they were replaced with an empty symbol to make game field less cluttered.

    Source code(tar.gz)
    Source code(zip)
  • v1.4(Sep 4, 2021)

    Now the field is only generated after your first click. In addition to that, you don't have to put all flags on the field. As soon as all non-bombs squares are open, you win!

    Source code(tar.gz)
    Source code(zip)
Inject custom C++ code into GameMaker Studio 2 YYC builds

YYC Boost Inject custom C++ code into GameMaker Studio 2 YYC builds! WARNING: This tool is currently in an early stage of development and it is not gu

Patrik Kraif 7 Dec 30, 2022
Open source translation for the Tsukihime Remake game

Tsukihime-Translation Open source translation for the Tsukihime Remake game prepared by Clovermoon and Tsukihimates. Copyright Disclaimer under Sectio

118 Jan 01, 2023
This is a classic guess coin game (Heads or Tails) implemented by the Chialisp.

This is a classic guess coin game (Heads or Tails) implemented by the Chialisp. It is an absolutely fair P2P game based on the Chia blockchain. You can play with anyone in the world without custody.

Kronus91 14 Jul 02, 2022
Mandaw 2 Mar 01, 2022
A didactic GUI chess game made in Python3 using pygame.

Chess A didactic GUI chess game made in Python3 using pygame. At the moment, there is no AI. The only way you can test the game is by playing against

Leonardo Delfino 1 Dec 22, 2021
It just a cli based snake game written in Python.

Snake Game in Python Things that I learned in this project: OOP in Python. Clean code. The curses library. How to run the game You need to clone this

Kevin Marques 7 Oct 01, 2022
SuperChess is a GUI application for playing chess.

About SuperChess is a GUI application for playing chess. It is written in Python 3.10 programming language, uses PySide6 GUI library, python-chess lib

Boštjan Mejak 1 Oct 16, 2022
Wordle-player - An optimal player for Wordle. Based on a rough understanding of information theory

Wordle-player - An optimal player for Wordle. Based on a rough understanding of information theory

Neill Johnston 3 Feb 26, 2022
A Frogger game in Python with pygame

CrockiCrocki A personal project of a simple "game" in Python to learn Pygame and Python. Requires: pygame: In Linux: pip3 install pygame In MacOS: pip

Jorge Abreu 1 Nov 07, 2021
Python Interactive Mini Games

Python Interactive Mini Games Mini projects from Coursera's An Introduction to I

Ashish Choudhary 1 Jan 16, 2022
Super Mario Kart November 1991 Prototype Repair by MrL314

Super Mario Kart November 1991 Prototype Repair by MrL314

MrL314 51 Dec 26, 2022
Snake game made in python with the pygame library.

Pygame snake Snake game made in python with the pygame library. Requirements pip pygame Pygame Installation On the command line, type: pip install pyg

Ayza 3 Oct 02, 2022
The main objective of the game is to destroy multiple waves of asteroids with the help of a blaster mounted on the spaceship.

Astronomia: let the exploration begin The main objective of the game is to destroy multiple waves of asteroids with the help of a blaster mounted on t

Aryan Nath 8 Nov 18, 2022
Follow the numbers - A simple game where the player should follow the numbers and connect the dots

follow_the_numbers This is a simple game where the player should follow the numb

Sammy Mishinev 3 Nov 22, 2022
MCRPC (Minecraft Resource Pack Comparator) checks your resource pack against any version of Minecraft to show resources missing from your pack for that version.

Minecraft Resource Pack Comparator MCRPC checks your resource pack against any version of Minecraft to show resources missing from your pack for that

3 Nov 03, 2022
General Crossy Road Game using Python code

Python-Game General Crossy Road Game using Python code Using code such as function and while using turtle, I was able to recreate a beginner version o

Jacob Paquette 1 Dec 19, 2021
Utility for generating randomizer datapacks for minecraft.

Minecraft Rando Utility for generating randomizer datapacks for minecraft. At the moment, it randomizes the following: Loot tables (including block dr

2 Dec 02, 2021
Code infrastructure and player algorithms for the Codenames board game.

Codenames Code infrastructure and player algorithms for the Codenames board game. This is the active fork of mkali-personal/codenames. Intro This is b

Asaf Kali 1 May 18, 2022
A terminal-based number guessing game written in python

A terminal-based number guessing game written in python

Akshay Vs 15 Sep 22, 2022
Useful guides, tutorials, and FAQs related to LEGO Universe and Darkflame Universe.

Awesome Lego Universe A curated list of awesome things related to LEGO Universe. LEGO Universe was a kid-friendly massively-multiplayer online role pl

Eric Myllyoja 33 Dec 12, 2022