WillyKidd / mine-sweeper

A simple mine-sweeper game written with Vue that allows customizable board dimensions πŸ’£

Home Page:https://willykidd.github.io/mine-sweeper/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mine-sweeper πŸ’£

My implementation of the classic mine-sweeper game!

The game runs in the browser, with the front-end written with VueJs and the backend in Rust with Wasm-Pack.

The game is deployed HERE, have a try!

Build and run locally

  1. Clone this repo...

  2. Compile the backend...

    cd ./miner-back
    wasm-pack build
  3. Build the frontend and run it...

    cd ./miner-front
    npm install --save
    npm run serve
  4. Go and checkout the game in your browser!

    The app should be running here if the port 8080 is available.

Features

  • Classical mine-sweeper icons and functions
  • Button animation
  • Random emojis πŸ˜†
  • Customizable
    • Board dimensions
    • Percentage of mines

Known issues

I wrote this game in a weekend when I had nothing better to do, as I was locked up in the dorm due to Covid...

I didn't plan well and started coding right away, and I used mostly brute-force algorithms (lots of recursions, which makes the game crash when the board gets bigger).

Also, there are lots of performance issues when deployed online. It's probably a bad idea to make each button a table cell... Canvas might have been a good replacement... Also, the emojis are too large, which induces lags when loaded.

About

A simple mine-sweeper game written with Vue that allows customizable board dimensions πŸ’£

https://willykidd.github.io/mine-sweeper/


Languages

Language:CSS 89.2%Language:Vue 8.0%Language:Rust 2.2%Language:JavaScript 0.3%Language:HTML 0.3%