Amazing-Python-Scripts

Форк
0

README.md

Maze Generator and Solver

Description

This is a Python maze generator and solver game built using the Pygame library. The game generates random mazes and allows the player to navigate through them using arrow keys or WASD keys. The maze generation is based on the Depth-First Search (DFS) algorithm, and the maze solving uses the Breadth-First Search (BFS) algorithm.

Features

  • Random maze generation using DFS algorithm
  • Maze navigation by the player using arrow keys or WASD keys
  • Maze solving using BFS algorithm
  • Reset option to generate a new maze
  • Timer to record the time taken to solve the maze
  • Visually appealing graphics and animations

How to Play

  1. Run the script maze_game.py using Python (requires Python 3.x and Pygame library).
  2. The maze will be generated, and the player will start at the entrance.
  3. Use the arrow keys or WASD keys to navigate through the maze.
  4. Try to reach the exit point indicated by the green cell.
  5. If you get stuck or want to generate a new maze, press the 'r' key to reset.

Dependencies

  • Python 3.x
  • Pygame library (Install using pip install pygame)

Controls

  • Arrow keys or WASD keys: Move the player
  • 'r' key: Reset the maze

Acknowledgments

The maze generation algorithm is based on Depth-First Search (DFS), and the maze solving algorithm is based on Breadth-First Search (BFS).

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.