https://github.com/billmei/nand2minesweeper
Minesweeper game written in Jack for the nand2tetris course
https://github.com/billmei/nand2minesweeper
Last synced: 2 months ago
JSON representation
Minesweeper game written in Jack for the nand2tetris course
- Host: GitHub
- URL: https://github.com/billmei/nand2minesweeper
- Owner: billmei
- License: mit
- Created: 2018-12-11T14:11:24.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-29T17:43:56.000Z (almost 5 years ago)
- Last Synced: 2025-02-21T11:48:36.299Z (8 months ago)
- Homepage: https://www.nand2tetris.org
- Size: 2.42 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nand2minesweeper
## 🎞 Watch the Demo 🎞
[](https://www.youtube.com/watch?v=wFfnx2FIt7U)## What is this?
This is my final project (Project 9) for the [nand2tetris](https://www.nand2tetris.org/) course! It's a Minesweeper game written in the Jack language.
nand2tetris is one of the most rewarding computer science courses I've taken. The course challenges us to build a full application (in this case, Minesweeper) using a high level language (the Jack language) compiled using a compiler we wrote ourselves, with an operating system we write ourselves, running on a hardware platform (the Hack machine) we designed ourselves, powered by a CPU we wired together ourselves. There is nothing left to "magic" and everything is built by the students down to the transistors!
## Who are you?
I'm [Bill Mei](https://billmei.net), the author of [Painless CSS](https://www.painlesscss.com), and professional software developer. [Hire me](https://billmei.net/contact/).
## How to load the game
Download the [nand2tetris software suite](https://www.nand2tetris.org/software) and run the script `tools/VMEmulator.sh` (on Unix machines) or `tools/VMEmulator.bat` (on Windows machines).
In the VMEmulator Java Applet, click on the folder icon to open a project, and then navigate to the `nand2minesweeper` directory.
Click on the `nand2minesweeper` folder and then click "Load Program" to load it.
Click "Yes" when it says "No implementation was found for some functions which are called in the VM code".
Set the "Animate" dropdown option to "No animation".
Finally, click on the fast forward button to run the game!
I pre-compiled the `.vm` files for you in the in the `nand2minesweeper` directory so you can run the game without compiling. If you would like to compile the `.vm` files yourself, then use your [nand2tetris software suite](https://www.nand2tetris.org/software) to run the JackCompiler to compile all the `.jack` files in the `nand2minesweeper` folder into `.vm` files.
## How to play Minesweeper
Use the arrow keys ←↑↓→ to move the cursor around the grid.
Press space to reveal a cell under your cursor. If you reveal a mine, it explodes, and the game is over! If you reveal a cell and it is not a mine, then a number will be shown on that cell. This number indicates the number of mines that are adjacent to that cell, in all 8 directions (horizontally, vertically, and diagonally).
Press f to plant a flag over a cell you suspect is a mine. This way, you can remind yourself which cells to avoid. Press f again to remove the flag.
Press r to restart the game at any time.
Press q to quit the game and halt execution.
## Screenshots
### Game in Progress
---
### Game Lost
---
### Game Won
---
### Tutorial
---

---
## License
MIT License