One day I could not sleep for some reason. So, to clear out my boredom I decided to write basic random mines + counting mines for fun, Which did help to sleep that night. Also, I wanted to learn how to work with terminal UI & it was a while since I wrote some go code. Well, the whole thing turns out to be a great learning experience.
I am not sure if the old go version will work but you can try.
- Go 1.16+
go run \*.go
Or you can download directly from the release section of the GitHub repository for your OS. If you download the binary from tags you have to chmod the binary chmod 777 ./minesweeper-macos or chmod 777 ./minesweeper-linux based on your os.
go build -o minesweeper
./minesweeper
This is my first time writing a small-scale go project. Please provide your feedback by raising an issue.
constants.go
contains shared variablesengine.go
contains all raw logic to calculate bombs, grid & bomb countsmain.go
bindsengine
withui
models.go
contains structui.go
contains all logic to trigger/update ui based on data
This project is licensed under the MIT license, Copyright (c) 2020 Hamza Iqbal. For more information see LICENSE.md
.