Skip to content

LeeTuah/clisweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ef30618 · · May 14, 2026

History

31 Commits
May 13, 2026
May 14, 2026
May 14, 2026
May 13, 2026
May 13, 2026
May 14, 2026

Repository files navigation

CLI Sweeper

CLISweeper

CLI Sweeper is my attempt of making a multiplayer command-line version of the classic game, Minesweeper.

Features

  • Tested and works well on both linux and windows.
  • Uses TCP Sockets to connect players in a server-client setup.

Gameplay Modes

  • Singleplayer: Classic minesweeper.
  • Multiplayer: 1v1 minesweeper inspired from the Battleship game. (both players place bombs and proceed to guess where each other's bombs are)

Demo Video

CLI Sweeper Demo Video

(click on the image)

Screenshots

CLISweeper CLISweeper

Project Structure

├── README.md
└── src
    ├── client
    │   ├── intro.cpp
    │   ├── main.cpp
    │   ├── minesweeper.cpp
    │   ├── multiplayer.cpp
    │   └── utils.cpp
    ├── include
    │   ├── conio_linux_port.h
    │   └── Menu.h
    └── server
        ├── main.cpp
        └── utils.cpp
�� utils.cpp

Installation

MUST have a C++17 or above compiler and make support.

Building from source

  1. Clone the repository
git clone https://github.com/leetuah/clisweeper.git

cd CLISweeper
  1. Compile it using Makefile
make
  1. If you are re-compiling the code, clean the code before re-running it using
make clean

Usage

Note: You must run a multiplayer server if you are attempting to play it.

1. Start server (if you are hosting it)

Open a terminal and start the server. It will listen for incoming TCP connections.

./server # on linux
server.exe  # on windows

2. Start client

Open the terminal and launch the client.

./client # on linux
client.exe  # on windows

3. Playing Multiplayer

  • Host generates a room, with a 5-digit unique room ID.
  • Other client joins with the shared room code.
  • The host runs the game and the game starts.

Libraries Used

License

MIT License