Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
resources
screenshots
src
.gitignore
CMakeLists.txt
LICENSE
README.md

README.md

minesweeper

Light version of Microsoft Minesweeper for Linux. Some interesting implementation moments are described here.

  1. Required dependencies
  2. Build and install
  3. Launch
  4. Launch with default configuration
  5. Launch with custom configuration
  6. Classic style
  7. RD style

Required dependencies

  • SDL2
  • SDL2_image
# E.g.: installation for Fedora 24

$ sudo dnf install SDL2 SDL2-devel SDL2_image SDL2_image-devel

Build and install

minesweeper]$ mkdir build && cd build
minesweeper]$ cmake ../
minesweeper]$ make
minesweeper]$ make install

# after completion minesweeper should be installed in minesweeper/release folder

Launch

release]$ ./minesweeper [path to config]

Launch with default configuration

# default configuration
release]$ cat resources/classic.conf 
mines=99
field_rows=16
field_cols=30
sprite_img=resources/classic.png
sprite_txt=resources/classic.txt

# launch
release]$ ./minesweeper

Launch with custom configuration

Classic style

# custom configuration
release]$ cat resources/classic.conf 
mines=10
field_rows=10
field_cols=10
sprite_img=resources/classic.png
sprite_txt=resources/classic.txt

# launch
release]$ ./minesweeper resources/classic.conf

RD style

# custom configuration
release]$ cat resources/rd.conf 
mines=99
field_rows=16
field_cols=30
sprite_img=resources/rd.png
sprite_txt=resources/rd.txt

# launch
release]$ ./minesweeper resources/rd.conf

# custom configuration
release]$ cat resources/rd.conf
mines=7
field_rows=7
field_cols=14
sprite_img=resources/rd.png
sprite_txt=resources/rd.txt

# launch
release]$ ./minesweeper resources/rd.conf