-
Run the code by typing
swift Minesweeper.swift
Help will display
![image](https://private-user-images.githubusercontent.com/95103/375971041-7c8d9acb-9621-44cd-8b9f-f136b3123336.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODk5NTgsIm5iZiI6MTczOTE4OTY1OCwicGF0aCI6Ii85NTEwMy8zNzU5NzEwNDEtN2M4ZDlhY2ItOTYyMS00NGNkLThiOWYtZjEzNmIzMTIzMzM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEyMTQxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4MTk2MTA3ZDJlNjYzMDUwOWJjNjFjYzkxMTU2NjY0YWY1YzMxNDQ4ODRlYzY2NDAyMzJmNGI2YjFiOWE0YTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.CZhs8VMIl8k4ZUogNPi8oy5F34m-4xFleChRLwx09ks)
- Dual board design one keeps the solved version, and the display board. This allows reverting a move and an easy way to check game wins.
- A floodFill utilizing a queue and visited.
- Flood fill returns a list of coodinates to copy over from the solved board to the display board
- Cheat mode for testing
- Solve command to display full solved game.
- Displays using emoji. I did have some formatting issues on terminal, depending on which terminal program being used due to double wide characters.
- I was having fun with this project, and decided to make a full app. Quick one
- UI only tested on iPhone 11 Max - I believe it has formatting problems on different size devices
- Use
tap
to reveal - Use
Long Press
to mark with pin. - It is a little bit difficult to tap the small boxes on a real device but with a little practice it works pretty well.
- Catalyst version, the window can be sized so the boxes are presented properly. but works pretty well.
- Error handling does not display the best errors.
- Small app supports App Clips
- iOS app that runs best on iPhone 11 Max
- Catalyst app which runs on the Mac
- Basic UI for adding running game.
- It uses same engine as the Command line version. Just removed the comamand line part.
- Only runs on latest OS or simulator.