So, I missed the bus to school today and decided to get creative in GMod instead. Popped a few magical caffeine pills and an energy drink on top of that. The result? Minesweeper: Source. Well, actually, it’s just a basic client-side vgui-based minesweeper…
how i use?!?!
To start, download the .lua file. Then copy it into your garrysmod/lua directory (usually C:/Program Files/Steam/steamapps/<accountname>/garrysmod/garrysmod/lua). Afterwards simply write lua_openscript_cl “schemer_minesweeper.lua” and then sch_ms_play into your console. Also, here’s a tutorial on Minesweeper.
Here’s the console command list.
** sch_ms_play* - creates a minesweeper board to play on.
** sch_ms_remove* - removes the minesweeper board.
** sch_ms_setnumcells* - sets new amount of cells (default: 9; min: 6; max: 50).
** sch_ms_setcellsize* - sets new cell size (default: 30; min: 15; max: 45).
** sch_ms_setnummines* - sets new amount of mines (default: 9; min: 6; max: 50).
PS: the code for it is an complete abomination. Just a warning.
Anyway. On my first try after completely finished coding the minigame, I got this score:
[SchemeMS] Score: 24.3 (open cells: 29; closed cells: 43; total cells: 81 mines: 9)