Skip to content

This is a fully complete Minesweeper game. Minesweeper solver coming after!

License

Notifications You must be signed in to change notification settings

krisb1220/minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ⚡ UPGRADE@ENERGYMARKETING.CO

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?

About

This is a fully complete Minesweeper game. Minesweeper solver coming after!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published