Frost-Phoenix/zig-sweeper
Minesweeper in zig using raylib
master
A Windows XP inspired Minesweeper game in Zig, using Raylib for graphics.
You will need Zig version 0.13.0
to compile this project.
zig build
The compiled program will be in ./zig-out/bin/zig-sweeper
.
Try it out directly!
nix run 'github:frost-phoenix/zig-sweeper' -- --help
# flake.nix
{
inputs = {
zig-sweeper.url = "github:frost-phoenix/zig-sweeper";
# ...
};
# ...
}
{ inputs, ... }:
{
home.packages = [
inputs.zig-sweeper.packages.${system}.default
# ...
];
# ...
}
You can run it directly using the following command:
zig build run -- --help
If you use this method, all arguments you pass to the program must be placed after --
.
Usage: zig-sweeper [difficulty] [custom_grid_options] [options]
Difficulties:
beginner 9x9 with 10 bombs
intermediate 16x16 with 40 bombs
expert 30x16 with 99 bombs
custom <nb_cols> <nb_rows> <nb_bombs>
Custom grid options:
<nb_cols> between 5 and 115
<nb_rows> between 5 and 70
<nb_bombs> must be less than nb_cols * nb_rows
General Options:
-s, --scale <amount> Set window scale (default 2, max 5)
-h, --help Print this help message and exit
Keybinds:
<ESC> Quit
<n> Generate new grid
<o> Open all cells
<r> Reset grid zoom and position
Mouse:
left click Open cell
right click Flag cell
middle click Drag grid when zoomed in
wheel scroll Zoom grid in/out
beginner | intermediate |
expert
See TODO.md.
A huge thanks to:
See LICENSE