GithubHelp home page GithubHelp logo

mastergroosha / telegram-bombsweeper-bot Goto Github PK

View Code? Open in Web Editor NEW
92.0 2.0 10.0 151 KB

A simple Minesweeper-like game

Home Page: https://t.me/bombsweeperbot

License: MIT License

Dockerfile 1.23% Python 97.19% Mako 0.97% Shell 0.61%
aiogram game minesweeper telegram telegram-bot aiogram3

telegram-bombsweeper-bot's Introduction

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.

screenshot

Used technology

  • Python 3.9;
  • aiogram 3.x (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, let's say /opt/bombsweeper. Inside it, make 3 directories for bot's data:
mkdir -p {pg/init,pg/data,redis/config,redis/data}

Grab docker-compose-example.yml, rename it to docker-compose.yml and put it to /opt/bombsweeper.

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

Grab pg_init_user.sh, put it into pg/init and make executable (add "x" flag). Open it, replace
myuser and mydb values with your own. Save file.

Grab env_dist file, rename it to .env and put it next to your docker-compose.yml, open and fill the necessary data. Pay attention to POSTGRES_DSN value, sync it with pg_init_user values.

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

telegram-bombsweeper-bot's People

Contributors

mastergroosha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.