Git Product home page Git Product logo

minesweeper's Introduction

Minesweeper By Energy Marketing Company

This is a full Javascript Minesweeper full with runnable tests, game logic, and GUI.

⚡ BY KRIS @ ENERGY MARKETING COMPANY ⚡ ENERGYMARKETING.CO ⚡ [email protected]

Commit Log

COMMIT 53:

Minor changes

Changes

a. Added fast mine on tile double click when flags in cell == number in tile

====================================

COMMIT 52:

Game is FINALLY fully functional!!!! (2/28/2020)

Changes

a. Added cell chain reaction !! b. Fixed bug where if a bomb was double clicked it would not run the highlight function, thus revealing that the cell is a mine. Caused by bomb cells not having a [neighbors] property.

Bug Fixes

a. Fixed timer bug

COMMIT 50:

Bugs mentioned in Commit 45 are still present. Minor bug fixes.

Bug Fixes

a. Fixed errorCan't read property hasFlag of undefined when a number is clicked b. Fixed bug where cell highlighting functionality wasn't working when a number is clicked c. Added functionality to to Easy Dom function $() to accept numbers as ID and Class names

====================================

COMMIT 47:

Bugs mentioned in Commit 45 are still present. Extremely minor changes and some optimizations.

Changes

Below are the changes:

  1. Removed unneeded console.log()'s that were clogging this terminal and slowing the game

Bug Fixes

a. Fixed bug where cell highlight functionality wasn't working after game reset b. Fixed bug where bomb locations weren't being appended to the game.bombLocations array

====================================

COMMIT 46:

Changes

Below are the changes:

1. Refactored code

a. Changed way bomb locations are calculated to avoid collisions b. Removed padding cells in favor of increased boolean logic c. To calculate cells, I added the "neighbors" property to each tile object. d. Added "Tile" class for each tile

2. Added Easy-Dom.js functions to native prototypes

a. Added the changeHTML (element.addHTML) & addHTML (element.addHTML) functions to the HTMLElement prototype b. Added eventListenerAll() to the NodeList prototype ( NodeList.addEventListenerAll() )

3. Added function double click function

a. When a tile is double clicked, it will highlight all neighbors remaining on the board by making them blend with the background (light gray)

Bugs:

hideBoard() is broken

a. After running hideBoard(), click events are broken

Timer function is broken

a. Timer function does not work after second restart, as picture below

Timer Example Gif

Todo:

a. Cell "chain reaction" b. Improved GUI?

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.