Skip to content

A Minesweeper clone designed to run entirely in terminal. The winning project of the October Coding Jam 2023

License

Notifications You must be signed in to change notification settings

Defective4/TUI-Mines

Repository files navigation

logo


Releases | Installation | Share your theme/replay

info Description

TUI Mines is a game created for the Java Jam hosted at Java Community Discord server.
It's a Minesweeper clone designed to run entirely in terminal.
The game also has its own terminal emulator that can be used as an alternative.

features Features

  • Playable without any GUI in a headless environment
  • All classic mechanics from Minesweeper, including chording
  • Ability to customize the difficulty
  • Theming - choose premade themes or create your own!
  • Replays - record, replay and share your games
  • User driven themes and replays repository
  • Discord integration (Rich presence)

planned Planned

  • Live multiplayer
  • More game styles/modes

installation Installation

Contents
Requirements
Windows
Linux
Other

Requirements

On all platforms the Java Runtime Environment is required to run the TUI Mines.
The lowest required version of JRE is 1.8.
The game was tested on all JRE versions from 1.8 to 17 inclusive.

Windows

To play TUI Mines on Windows it is recommended to download the executable file (.exe) from the Releases page.
Alternatively you can download the universal JAR file.

Linux

(Recommended) Install from Debian repository

You can download the game from my Debian repository. To do so:

  1. Add the repository to your system
sudo curl https://debian.racuszki.pl/api/packages/Defective/debian/repository.key -o /etc/apt/trusted.gpg.d/github-Defective.asc
echo "deb https://debian.racuszki.pl/api/packages/Defective/debian stable main" | sudo tee -a /etc/apt/sources.list.d/github-defective.list
sudo apt update
  1. Install TUI Mines using APT
sudo apt-get install tui-mines

Manual installation

To install TUI Mines without adding any repositories you can download the Debian package (or universal JAR if you don't want to install/don't have root privileges) from the Releases page.

Other

TUI Mines should be able to run on any platform that can run Java applications.
It was confirmed to run in Termux on Android.

build Building from source

Requirements

You have to install Apache Maven and Java Development Kit 1.8 (I recommend Adoptium for Windows users) to compile TUI Mines from source.
Also Git is recommended to clone the repository, but you can also download it manually.

Building

  1. Clone/Download and navigate to the repository
    git clone https://github.com/Defective4/TUI-Mines
    cd TUI-Mines
  2. Build the project using Maven
    mvn clean package
  3. After successful build you will find built exe
    and jar-with-dependencies in the tui-mines-game/target directory

share Share your theme or replay

You can share your themes and replays in a separate repository (see link above).
Instructions on how to share are also included.
All shared assets are available for viewing and downloading using in-game browser.

cogs Technical information

Libraries used

  • Lanterna - curses-like library for terminal user interfaces
  • GSON - JSON parser library. Used to store user preferences and themes
  • sqlite-jdbc - SQLite driver for JDBC. Used to store leaderboards.
  • discord-rpc - Discord Rich Presence integration.
    Replaced with custom implementation.
    See discord-presence-min module.

Tools

  • Sound effects created using LMMS
  • All graphics were created in Inkscape

Replay file format

TUI Mines uses its own file format for storing replays.
It is documented here

About

A Minesweeper clone designed to run entirely in terminal. The winning project of the October Coding Jam 2023

Topics

Resources

License

Stars

Watchers

Forks

Languages