Display a murphy's law at the windows start up.
- Get laws list from tech_laws.file.
- Get laws list count.
- Generate a random number in range of the list count
- Check if the number is in stat file.
- If it was not in stat file, proceed, otherwise, go to step 3. 5.1. If attemps became equal to laws list count, it means all laws are had been showed once, so clear stat file and start go to step 3.
- Show the law at that position.
- Insert the number into stat file.
- Terminate the program.
If you're on a windows machine or you have powershell core installed on your unix-based os, you can use buildRun.ps1
file. just run it and it will build and run the project using proper arguments. If you're not, you have to build and run it manully, using commands below:
$ rsrc -manifest main.manifest -o rsrc.syso
$ go build -ldflags="-H windowsgui"
$ .\murphy.exe