A minesweeper clone for the browser.
Play here: https://samuel-risner.github.io/minesweeper-clone/
I know how easy it is to cheat the game, but if you do not find the optimal way, then SHAME! SHAME! SHAME!
Two branches are important: the "build" branch (this one) and the "deploy" branch.
The "build" branch handles building the stuff for the webpage and contains all the files that you don't need to host on a webpage (config files etc.).
The "deploy" branch on the other hand contains all the files needed for displaying the page, but not the stuff for building it (eg. the TypeScript files).
For compiling the stuff I cloned the "deploy" branch into the "build" branch. Meaning that there is a folder named "minesweeper-clone" containing all the stuff from the "deploy" branch. The folder is not tracked in the "build" branch, since duplicate code sucks.
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
venv\Scripts\activate
- Install the requirements:
pip install -r requirements.txt
- Run the server:
python main.py
- Stop the server:
Hit CTRL+C
- Deactivate the virtual environment:
deactivate
Repeat steps 2, 4, 5 and 6.
npm install -D
npm run build_ts
npm run build_tw
npm run watch_tw
npm run watch_ts