mine

command module
v0.0.0-...-bbe6e07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 10 Imported by: 0

README

Terminal Minesweeper

$ ./mine 
 @  .  @  .  .  .  .  .  .  .  @  .  .  .  .  .  .  .  .  .
 .  .  @  @  .  .  @  .  @  .  .  .  .  @  .  @  @  .  .  .
 @  2  2  2  2  @  .  .  .  .  .  .  .  .  @  .  @  .  .  @
 .  1        2  .  .  .  @  .  @  .  .  .  .  .  .  .  .  .
 .  2  1     1  @  .  %  %  .  .  @  .  .  .  @  .  .  .  @
 @  @  2  1  2  .  .  .  .  @  @  .  .  .  .  .  .  .  @  .
 .  .  .  @  .  .  .  .  @  .  .  @  @  .  .  @  1  1  1  1
 .  @  .  .  .  .  .  .  .  2  1  3  @  2  1  1  1         
 .  .  .  .  .  .  .  @  @  1     1  1  1                  
 .  . [@] .  .  @  .  .restart? [y/n]      1  2  2  1      
 .  .  .  @  .  @  @  .  .  2  1           1  @  @  3  1  1
 .  .  .  .  %  .  .  @  @  @  1  1  1  1  1  .  @  .  @  .
 .  2  @  .  @  .  .  .  .  .  .  .  @  .  .  .  @  .  .  @
 @  .  .  .  2  @  .  .  .  %  .  @  .  .  %  .  .  .  @  .
 @  @  @  .  .  .  @  .  .  .  .  @  .  .  .  .  @  .  .  .
 @  .  @  @  .  1  .  .  .  .  .  %  .  .  .  .  @  .  .  .
 @  .  .  .  .  .  .  @  .  @  .  .  .  .  .  .  .  .  .  .
 .  .  .  @  .  @  .  @  .  .  .  .  @  .  .  .  .  .  .  .
 .  .  .  @  .  .  .  @  .  .  .  .  .  .  .  @  .  .  .  .
 @  .  .  .  .  @  .  .  .  .  @  .  .  @  .  .  .  .  .  .

Stolen from here.

Created to better understand how to write interactive terminal application, and play with the idea of building golang code through make.

Description

Regular minesweeper for terminal, written in go. Nothing special.

Representation Description
. closed cell
empty cell
@ bomb
% flag

Build

go build .

Controls

Shortcut Description
Escq quit
UpW move right
DownS move down
LeftA move left
RightD move right
EnterF flag cell
Space open cell
R restart
Y confirm
N decline

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL