Skip to main content
Back to projects
prototypeJan 14, 2025

Minesweeper

A classic Minesweeper clone with multiple difficulty levels and a clean, responsive web interface.

pythonflaskjavascriptweb

Note: This project is not yet available on GitHub.

Overview

A faithful recreation of the classic Minesweeper game, built as a web application. It features the traditional gameplay mechanics with modern conveniences like responsive design, multiple difficulty presets, and game statistics tracking.

Key Features

  • Classic Gameplay: Left-click to reveal, right-click to flag, middle-click to chord.
  • Difficulty Levels: Beginner (8x8, 10 mines), Intermediate (16x16, 40 mines), Expert (30x16, 99 mines).
  • Custom Games: Create boards with custom dimensions and mine counts.
  • Game Statistics: Track wins, losses, and best times per difficulty.
  • Responsive Design: Playable on desktop and mobile devices.
  • No-Guess Mode: Optional mode that guarantees solvable boards without guessing.

Technical Architecture

The game runs as a Flask web application with game logic handled server-side. The frontend uses vanilla JavaScript for interaction, with the game state synchronized through API calls. This architecture ensures consistent behavior and prevents client-side cheating.

Components:

  • Game Engine: Python class managing board state, reveal logic, and win/loss detection.
  • API Layer: Flask routes for game creation, moves, and state queries.
  • Frontend: HTML5 Canvas for rendering with JavaScript event handling.
  • Statistics: SQLite database tracking game history and records.

Technology Stack

  • Backend: Python, Flask
  • Frontend: HTML5 Canvas, vanilla JavaScript, CSS
  • Database: SQLite for game statistics
  • Deployment: Standard WSGI deployment

Current Status

Feature-complete with all planned functionality implemented. The game is fully playable across all difficulty levels. May add leaderboards and multiplayer racing mode in the future.

Have questions about Minesweeper?

Try asking the AI assistant! Here are some ideas:

Related Projects