A classic MineSweeper game built with Blazor WebAssembly and C#.
This project is configured to automatically deploy to GitHub Pages using GitHub Actions.
-
Enable GitHub Pages in your repository:
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select GitHub Actions
-
Push your code:
git add . git commit -m "Add Blazor WebAssembly with GitHub Pages deployment" git push origin master
-
Wait for deployment:
- Go to the Actions tab in your repository
- The deployment workflow will automatically run
- Once complete, your app will be available at:
https://vanarkel.github.io/MineSweeper/
- The
.github/workflows/deploy.ymlworkflow automatically builds and deploys the app when you push to themasterbranch - The app is built using
dotnet publish - The base path is automatically updated to match your repository name
- A
.nojekyllfile is added to ensure proper routing - A
404.htmlfile is created for SPA fallback routing
- .NET 6.0 SDK or later
-
Clone the repository:
git clone https://github.com/vanarkel/MineSweeper.git cd MineSweeper -
Run the application:
cd MineSweeperClient dotnet run -
Open your browser and navigate to the URL shown in the terminal (typically
https://localhost:5001orhttp://localhost:5000)
cd MineSweeperClient
dotnet publish -c ReleaseThe published files will be in bin/Release/net6.0/publish/wwwroot/
- MineSweeperClient/ - Blazor WebAssembly client application
- MineSweeperLogic/ - Game logic library
- MineSweeperClientBlazor/ - Legacy Blazor Server version (deprecated)
- Classic MineSweeper gameplay
- Left-click to reveal cells
- Right-click to flag mines
- Middle-click for chord reveal
- Timer and move counter
- Win/loss detection
- Game logging
- The app uses client-side rendering (Blazor WebAssembly)
- All game logic runs in the browser
- No server-side dependencies required for deployment
- Compatible with GitHub Pages static hosting
Feel free to submit issues and pull requests!