Giter Club home page Giter Club logo

terminal-mines's Introduction

terminal-mines

An ncurses-based minesweeper game. This was made because I wanted a minesweeper game that was efficient to play without mouse. It's also a reference frontend for libminesweeper.

Game screenshot

Installation

OSX Homebrew

brew install joelekstrom/repo/terminal-mines

Other OS's/manual compilation

After cloning the project, cd to the folder and run:

git submodule update --init
make install

Terminal Mines is now installed on your system.

Starting the game

Run the game by typing terminal-mines. Run terminal-mines --help or man terminal-mines to view additional info.

To select size/difficulty, play with the following options:

  • --width Width of the game board
  • --height Height of the game board
  • --mine-density a value between 0.0 and 1.0 where 1.0 means every tile will have a mine, and 0.0 means zero tiles will have mines.

All the arguments can be written shorthand with the first letter in the name.

Example:

terminal-mines -w 20 -h 20 -m 0.5

Controls

  • Movement: hjkl or arrow keys
  • Place flag: f or g
  • Open tile: ,

The controls were inspired by nethack/vim.

Adventure Mode

Adventure Mode is a new mode added in version 1.1.0. To start a game in adventure mode, use the --adventure-mode or -a option. When playing in adventure mode, you control the player character, @, and you must reach the exit tile, >.

Every tile you cross will be opened, and you can not place any flags. The standard difficulty options work in adventure mode as well.

Using plain ASCII

If you prefer the old graphics, compile with make ascii-only before running make install.

Uninstall

To completely remove terminal mines (if you compiled it yourself), run make uninstall in the source folder.

terminal-mines's People

Contributors

efreak avatar joelekstrom avatar kotarot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

terminal-mines's Issues

Lack of a license

This repo lacks a license. This means, forking, using, editing, and redistributing this repo and it's contents are technically not allowed. It would be smart to add a LICENSE file to it, or simply copy over the MIT license libminesweeper is using.

Adventure mode is not always winnable

The game doesn't at the moment guarantee a path to the exit tile.

This can be solved by using a pathfinding algorithm to check if there's a possible exit path, and if not, remove some mines to make sure there is one.

Help option

The game should include a basic help entry when running the game without any options or with option like --help.

--help option doesn't work when running locally

Since --help opens the manpage, this won't work if the manpage isn't installed (which happens when one runs make install.

This should be fixed by looking for the manpage in the local folder as well.

Related to #5

Controls are too "right hand focussed", custom controls

Let me start by saying thank you for your work on this! I've definitely spent 5+ hrs on this, I keep a stopwatch and track my own high score list. It helps me stay alert if drowsy sometimes while working, a good coffee break. I've been using this since April 2023.

While I admire your homage to Nethack with the hjkl movement, I think an additional key alternative ought to be there on the left side of the keyboard mainly for . open tile. hjkl coupled with . seem too hard on the one's right hand and I feel I might get RSI XD. I think I played long enough to know it might be too stressful on it. Thankfully, f to flag is on the left side and I feel an alternative to open tile nearby, say either of asd, will ease that strain on players a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.