CLI Sweeper is my attempt of making a multiplayer command-line version of the classic game, Minesweeper.
- Tested and works well on both linux and windows.
- Uses TCP Sockets to connect players in a server-client setup.
- 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)
(click on the image)
├── 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
MUST have a C++17 or above compiler and make support.
- Clone the repository
git clone https://github.com/leetuah/clisweeper.git
cd CLISweeper- Compile it using Makefile
make- If you are re-compiling the code, clean the code before re-running it using
make cleanNote: You must run a multiplayer server if you are attempting to play it.
Open a terminal and start the server. It will listen for incoming TCP connections.
./server # on linux
server.exe # on windowsOpen the terminal and launch the client.
./client # on linux
client.exe # on windows- 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.
- conio for linux: For making keyboard inputs work on linux.
- Effortless menus: For generating a nice-looking terminal UI.
MIT License
