News for hackers. Stuff that matters.
Re:Haxing Minesweeper by Rjevski on Sunday April 08, 2018 @09:34AM (#16786013)
I always thought Minesweeper would compute the minefield dynamically as you played instead of generating a fixed map of the minefield at the beginning of the game.
Re:Haxing Minesweeper by rashkov on Sunday April 08, 2018 @10:49AM (#16786313)
There is one place where it's dynamic, which is that if your very first click is on a mine, then it'll relocate it to the upper-left corner (or the next available spot).
Re:Haxing Minesweeper by Spare_account on Sunday April 08, 2018 @12:26PM (#16786839)
I'm now questioning my memory because I'm convinced I have hit a mine on the first click before ...
Re:Haxing Minesweeper by davvolun on Monday April 09, 2018 @11:14AM (#16793654)
Maybe a clone?
Re:Haxing Minesweeper by ATsch on Sunday April 08, 2018 @11:00AM (#16786400)
I'm surprised it's done this way... I'd expect that it just doesn't generate the mines until the first click.
Re:Haxing Minesweeper by ronilan on Sunday April 08, 2018 @11:49AM (#16786638)
Nice.

I once wrote a “clone”[1] and when someone here pointed out the “first click is safe” feature, I implemented it by putting the reshuffle inside a while. Never thought of the first click as being “pre game”...

[1] https://www.ronilan.com/bugsweeper/

Re:Haxing Minesweeper by Zarel on Sunday April 08, 2018 @06:21PM (#16788818)
Modern versions of Minesweeper actually makes it so nothing _around_ your first click is a mine, so you always reveal more than one square.

https://guangcongluo.com/dminer/

is a version I wrote while trying to teach myself React.

Re:Haxing Minesweeper by monochromatic on Sunday April 08, 2018 @09:55AM (#16786074)
There’s the possibility of painting yourself into a corner (generating an inconsistent board) if you do it on the fly. It could be done, but it’s probably just simpler to generate it at the outset and then do lookups.

edit: unless you just meant that the adjacency numbers could be generated on the fly, in which case painting yourself into a corner isn’t a concern

Re:Haxing Minesweeper by murkle on Sunday April 08, 2018 @12:32PM (#16786874)
Do you mean something like this? (so you can always work out something logically ie no guessing) https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mine...
Re:Haxing Minesweeper by plastroltech on Monday April 09, 2018 @06:30PM (#16797541)
The fact that it doesn't can be exploited by running it in a virtual machine and using the snapshot feature to go back in time. That's how we made this Website is Down video: https://www.youtube.com/watch?v=1SNxaJlicEU