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)
Minesweeper clone with 3 modes of difficulty, UI scaling and custom games feature.

Insect Sweeper Minesweeper clone with 3 modes of difficulty, UI scaling and custom games feature. Mines are replaced with random insects that a player

Piotr Data 1 Nov 5, 2021
Several implementations of classical games (ex: FlappyBird, Minesweeper etc.) using Python (pygame)

Mini Games with Pygame This projects implement several classic and popular games in Python, using python package -- pygame. Currently, 4 games are alr

null 1 Feb 14, 2022
This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle

Pyal Telegram Bot This is a simple telegram bot for the game Pyal, a word guessing game inspired by Wordle. How does it work? Differently from the ori

Rafael Omiya 4 Oct 6, 2022
Blender Game Engine Game Type Templates Logic Bricks (and Python script) based Game Templates for Blender

Blender-Game-Engine-Templates Blender Game Engine Game Type Templates Logic Bric

null 3 Oct 25, 2022
Game-of-life - A simple python program to simulate and visualise the Conway's Game of life

Conway's game of life A simple python program to simulate and visualise the Conw

Dhravya Shah 3 Feb 20, 2022
Arcade-like space shooter game written entirely in python

E.T.-Attack Arcade-like space shooter game written entirely in python Project description A space shooter game - inspired by the legendary game Space

Sven Eschlbeck 2 Dec 17, 2022
A minimal open source mtg-like tcg game made in python that can be played on a terminal emulator using a keyboard.

A minimal open source mtg-like tcg game made in python that can be played on a terminal emulator using a keyboard.

Amos 3 Aug 29, 2021
Inflitator is a classic doom and wolfenstein3D like game made in Python, using the famous PYGAME module.

INFLITATOR Raycaster INFLITATOR is a raycaster made in Python3 with Pygame. It is a game built on top of a simple engine of the same name. An example

Zanvok Corporation 1 Jan 7, 2022
This is the card game like HearthStone and Magic

Territory War How to use it use pip3 to install django and channels: pip3 install Django pip3 install channels go to CardGame/first/consumers.py and g

Caesar 3 Oct 24, 2022
Building a Mario-like, classic platformer game in Python using the PyGame Library

Building a Mario-like, classic platformer game in Python using the PyGame Library

Clarence Vinzcent Reyes 1 Feb 6, 2022