diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cc4abd0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2025, bdnugget +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8939356 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Terminal Minesweeper + +A Minesweeper game that runs in your terminal using the gocui library. + +![Minesweeper Screenshot](screenshot.png) +## Features + +- Classic Minesweeper gameplay +- Colorful terminal interface with emoji characters +- Mouse support for opening cells and placing flags +- First-click safety (you'll never hit a mine on your first click) + +## How to Install and Run + +### Prerequisites + +- Go 1.22 or later (for math/rand/v2) +- Git + +### Installation + +1. Clone the repository: + ``` + git clone https://gitea.boner.be/bdnugget/minesweeper + cd terminal-minesweeper + ``` + +2. Install dependencies: + ``` + go mod tidy + ``` + +### Running the Game + +Simply run: +``` +go run main.go +``` + +## How to Play + +- Left-click: Open a cell +- Right-click: Place/remove a flag +- 'R' key: Restart the game (broken for now lol) +- Ctrl+C: Quit the game + +## License + +This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..971b4c5 Binary files /dev/null and b/screenshot.png differ