Giter Site home page Giter Site logo

cminesweeper's Introduction

cminesweeper

A curses-based version of the classic game of Minesweeper, built for the Linux console.


Cminesweeper is a lightweight implementation of the classic Minesweeper game, written in C and utilizing the ncurses API to work completely in a terminal. It is simple, responsive, and SSH-compatible without the need for X-forwarding.

Building

Linux:

make all

Dependencies

Cminesweeper is built using the curses API. As such, you'll need to make sure to install it before you try to build cminesweeper. Depending on your Linux type, the ncurses development package may have a different name.

Ubuntu:

apt install ncurses-devel

openSUSE:

zypper in ncurses-dev

Usage

To start a game of Minesweeper, run the executable through a terminal. You'll have to cd into the directory where you compiled cminesweeper, because it doesn't install itself into a central directory like /usr/bin yet.

cd ~/src/cminesweeper
./cminesweeper

If you have a previous game already saved, you'll be prompted to choose between starting a new game or loading your previous game. If you start a new game or if you have no game saved, you will be prompted to choose a difficulty level.

Controls

Menus

Menus should be pretty intuitive, but just in case you're confused, here's how to navigate them:

  • Use WASD or the Arrow Keys to move the cursor
  • Use Enter/Return to choose that option
  • Alternatively, type the number next to an option to instantly choose that option
  • Press Q or Escape to close the menu

Gameplay

When it comes to controlling the game itself, you have several options:

  • Use WASD or the Arrow Keys to move the cursor around the field
  • Use Z, Enter/Return, or / (slash) as the Primary Select Button (equivalent to a left-click)
  • Use X or ' (apostrophe) as the Secondary Select Button (equivalent to a right-click)
  • Press the Spacebar or M to toggle between Normal mode and Flagging mode
  • Press Q or Escape to open the pause menu
  • Press R to start a new game without being prompted first
  • Press E or Ctrl+S (on some systems) to save your game

cminesweeper's People

Contributors

eliotbaez avatar

Stargazers

Ben Kunkle avatar

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.