Code Monkey home page Code Monkey logo

mine-sweeper's Introduction

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.

mine-sweeper's People

Contributors

willykidd avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.