Samuel-Risner / minesweeper-clone

A minesweeper clone for the browser.

Home Page:https://samuel-risner.github.io/minesweeper-clone/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minesweeper-clone

A minesweeper clone for the browser.

Play here: https://samuel-risner.github.io/minesweeper-clone/

Btw

I know how easy it is to cheat the game, but if you do not find the optimal way, then SHAME! SHAME! SHAME!

Repo Structure

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).

Project Structure

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.

Development (Windows cmd)

Run the Python server for the first time

  1. Create a virtual environment:
python -m venv venv
  1. Activate the virtual environment:
venv\Scripts\activate
  1. Install the requirements:
pip install -r requirements.txt
  1. Run the server:
python main.py
  1. Stop the server:

Hit CTRL+C

  1. Deactivate the virtual environment:
deactivate

Run the server for a second time

Repeat steps 2, 4, 5 and 6.

Install Node.js stuff

npm install -D

Compile TypeScript

npm run build_ts

Compile Tailwind CSS

npm run build_tw

Watch Tailwind CSS

npm run watch_tw

Watch TypeScript

npm run watch_ts

About

A minesweeper clone for the browser.

https://samuel-risner.github.io/minesweeper-clone/

License:MIT License


Languages

Language:TypeScript 98.4%Language:Python 1.0%Language:JavaScript 0.5%Language:CSS 0.2%