Giter Club home page Giter Club logo

minesweeper's People

Contributors

eslingerbryan avatar fixitdik avatar jpbarends avatar kmdsbng avatar michaelbutler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

minesweeper's Issues

Suggested improvement #4: Add a pause option

It would be really nice to add a button which pauses the timer so you can answer a call (of nature or phone) in the middle of a game. On the Windows version this happened if you minimised the game but for this version I think a button will do. However it also needs to prevent them "cheating" by using the pause to give themselves time to think, so the board should be hidden while the timer is paused.

You should create a gh-pages branch

Look into gh-pages, I and a lot of people would probably love to try out your game, but it's a little inconvient to have to clone it. May as well just host on gh-pages for free!

Problem with Minesweeper

Hey I found your game a week or so, loved it! No ads, plays great. But, I tried to use it Yesterday and it won't reveal ANY numbers other than the one you click on. Oh, and I'm talking about your live hosted version.

Did I do something wrong?
minesweeper

Suggested improvement #1: Rationalise Custom parameters

Hi Michael, since MineSweeper was dropped from Windows I was looking for a close replacement and I came across this one of yours which is probably slightly over-engineered but has introduced me to Workers and other advanced features in JavaScript that I didn't even know were there which makes it by far my favourite implementation. While looking at the code I did find some areas I thought might stand a little improvement, nothing fundamental you understand but just to bring it closer to the original version. I will add each as a separate issue so we can tick them off (as I intend to attempt to make the changes myself in a fork as you suggested in our email exchange), so let's start with this:

The Custom parameters are not validated nor rationalised so you can in fact specify a grid that is too large for Java to handle (e.g. 100 x 100 with 9000 mines) causing the code to "hang" when you click the first square. The original version limited the dimensions to be:

x: between 9 & 30 (I suggest just implementing a maximum of 30, so a minimum of 1)
y: between 9 & 24 (ditto)
mines: the original performs a weird, non-linear calculation to determine a maximum, I suggest a maximum of (number of squares-1) so there is at least one square they can click on

I suggest the Minesweeper code itself performs this rationalisation in the js file to protect the logic, then the same (or more strict) limits can also be applied in the outer code giving a better user experience.

Suggested improvement #3: Top-left square never a mine

In the later versions of the Windows version they learnt that users got pretty hacked off when the first square they click is a mine and so they coded it so that the top left square was never a mine and so could be relied on as a start point for the puzzle. This is also the reasoning behind my suggestion earlier that the number of mines in a custom grid is always one less than the maximum number of squares, so there is always a non-mine to click on and, of course, it will always be the top-left one.

Suggested improvement: Replace alerts with jQuery dialogs

Getting really picky now as you can tell Michael so please forgive me - just thinking that we could use jQuery dialog object to present messages to the user rather than the prompt and alert methods we use now? Happy to give it a shot if you would rather I did it :)

Suggested improvement #2: Implement Shift & Ctrl key modifier to mouse clicks

Suggested improvement: Allow the use of the shift or ctrl key to make a left button on the mouse behave as the right button (as in the Windows version)

The "click both buttons at once" works well enough, but if you were used to the shift or ctrl key feature in the Windows version it does feel slightly easier

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.