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)
Nerdle - a nerd's approach to solving Wordle

Nerdle - a nerd's approach to solving Wordle

4 Nov 28, 2022
Made to help you create UI using pygame in python, gonna add way more to this project

Pygame visualizer Made to help you create UI using pygame in python, gonna add way more to this project. As of now, this is only hours worth of work.

Ayza 2 Feb 08, 2022
A two-player strategy game played on a rectangular grid made up of smaller square cells of chocolate 🍫 or cookies 🍪

Chomp Game ©️ Chomp is a two-player strategy game played on a rectangular grid made up of smaller square cells of chocolate 🍫 or cookies 🍪 , which c

Farivar Tabatabaei 2 Feb 02, 2022
Racing Fire - A simple game made with pygame.

Racing Fire A simple game in the making. Using pygame, this game is made to feel like an old arcade game. I developed a simple controller for it with

Builder212 1 Nov 09, 2021
HackNC 2021 Project

pyTunes HackNC 2021 Project Setting Up Once the repo is cloned, install the requirements through pip install -r ./requirements.txt Once that is done,

Demo 1 Nov 07, 2021
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
A Neural Network based chess engine and GUI made with Python and Tensorflow/Keras.

Haxaw-Chess Haxaw: Haxaw is the Neural Network based chess engine made with Python and Tensorflow/Keras. Also uses the python-chess library. (WIP: Imp

Sarthak Bharadwaj 8 Dec 10, 2022
Navicella cavallo, gioco 2D stile space shooter

Navicella Cavallo Il miglior gioco in circolazione Navicella cavallo è un gioco 2D basato sullo stile dei giochi space shooter Come installare Navicel

Matteo 6 Jul 03, 2022
A programme which basically has the same function as the actual Rock paper scissors game.

A programme which basically has the same function as the actual Rock paper scissors game.

1 Feb 11, 2022
A Higher-Lower web game made in Python using Flask framework.

Higher Lower Web Game Guess the random number from 0 to 9 in this web game made with Python and Flask Framework Modules that were used Random Flask In

Yago Goltara 1 Oct 27, 2021
An exploration of a fantasy world, to autobattle your way to ruling the demesne.

Not Quite Paradise 2 (no relation to NQP, I just like the name enough to want to keep it.) Badges! Current position: Quality of last commit: Who dunni

9 Mar 12, 2022
DOTD - A murder mystery game made in Python

DOTD This repo holds the files for my video game project from ENG101, Disaster o

Ben Bruzewski 1 Jan 13, 2022
A networking library for multiplayer games.

Aerics A networking library for multiplayer games. Getting Started Install Python Open cmd/terminal and type: pip install Aerics Examples Creating a

Yusuf Rençber 3 Jan 04, 2023
XPlaneROS is a ROS wrapper for the XPlane-11 flight simulator.

XPlaneROS XPlaneROS is a ROS wrapper for the XPlane-11 flight simulator. The wrapper provides functionality for extracting aircraft data from the simu

AirLab Stacks 26 Dec 04, 2022
Wordle player - A Class that plays wordle optimally

wordle_player A Class that plays wordle optimally if you want to play wordle opt

Andrés Hernández 1 Jan 31, 2022
The Sinclair ZX Spectrum BASIC compiler!

ZX BASIC Copyleft (K) 2008, Jose Rodriguez-Rosa (a.k.a. Boriel) http://www.boriel.com All files in this project are covered under the GPLv3 LICENSE ex

Jose Rodriguez 143 Dec 13, 2022
Utility to find games owned by all (or at least some) of the passed players.

SteamCommonGameFinder Utility to find games that are owned by all (or at least some) of the players you pass into this programm. You can already find

Daniel O'Grady 4 Jan 04, 2022
Pokemon game made in Python with open ended requirements from Codecademy

Pokemon game made in Python with open ended requirements from Codecademy. This is one of my first projects utilizing OOP and classes! -This game is a

Kevin Guerrero 2 Dec 29, 2021
For educational purposes, a simple script that assists in solving the word game Wordle.

WordleSolver For educational purposes, a simple script that assists in solving the word game Wordle. Instructions Pick your first word from the sugges

Christian De Leon 2 Mar 25, 2022
Adventure-Game - Adventure Game which is created using Python

Adventure Game 🌇 This is a Adventure Game which is created using Python. Featur

ArinjoyTheDev 1 Mar 19, 2022