Giter Site home page Giter Site logo

korsvanloon / minesweeper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blurrah/minesweeper-start-here

0.0 0.0 0.0 43 KB

Created with CodeSandbox

Home Page: https://codesandbox.io/p/github/1423625/Minesweeper-start-here

HTML 5.26% TypeScript 83.97% SCSS 10.77%

minesweeper's Introduction

Minesweeper

We're going to build a classic: Minesweeper ๐Ÿ˜€

The game works like this:

  • There is a field of 100 tiles with hidden contents. There are mines randomly placed.
  • When you hit a mine, the game ends
  • When you click a tile and there is no mine underneath, it is cleared.
  • Any adjecent tiles that do not have mines around will also be cleared.
  • When all tiles are cleared, you've won the game.

You can try the game here: https://minesweeper.online/start/1

Todo

You can use the existing code but feel free to rewrite anything.

  1. In the top right corner, fork this repo.
  2. Handle a click on a mine (game ends)
  3. Handle a click on a tile without a mine: set showContent to true of the current tile
  4. Then also reveal any adjecent tiles that have no mines around.
  5. Then also reveal any adjecent tiles that have some 1 or more mines around.
  6. Done? Help a fellow colleague with some tips!
  7. Continue: In generateGame, replace that static grid. Dynamically generate it with random mine placement
  8. Bonus: Handle a right click (show a flag)
  9. Bonus: Find a fun challange to share on codewars.com

minesweeper's People

Contributors

korsvanloon avatar mookth789 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.