Skip to content

rdiachenko/minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published