Skip to content

About

Terminal Minesweeper written in PHP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Minesweeper

A terminal-based Minesweeper game written in PHP.

Features

  • Classic Minesweeper gameplay

  • Runs entirely in the terminal

  • Written in pure PHP

Compatibility

Tested on Windows (PowerShell).

Linux/macOS may work but has not been tested.

Requirements

  • PHP 8.1 or newer

Check your version:

php -v

Installation

Clone the repository:

git clone https://github.com/AlexLeLay/php-minesweeper.git

cd php-minesweeper

Usage

Run the game:

php ./main.php

Difficulty Selection

The game automatically checks terminal size before starting:

Terminal difficulty check

Controls

Example:

  • 3 4 → reveal row 3, column 4

  • f 3 4 → place/remove a flag

Gameplay preview

Gameplay preview

TODO

  • Help the user resizing the terminal

  • Add timer

  • Scoring system

  • Custom levels

  • Save the game to resume later

License

MIT

About

Terminal Minesweeper written in PHP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages