The Saper Go is an implementation of Minesweeper game written in golang
- by using
git
git clone https://github.com/gucio321/saper-go
cd saper-go
go get -d ./...
to build, use go build .
to run - go run cmd/game/game.go
- by
go
itself:
go get github.com/gucio321/saper-go
project provides a giu widget for minesweeper game usage is very simple e.g.:
code
package main
import (
"github.com/AllenDang/giu"
game "github.com/gucio321/saper-go/pkg/sgiu"
)
func loop() {
giu.SingleWindow("game").Layout(
game.Create("minesweeper-game-instance-1", 16, 30, 99),
)
}
func main() {
wnd := giu.NewMasterWindow("minesweeper", 640, 480, 0)
wnd.Run(loop)
}