remix logo

Hacker Remix

One Square Minesweeper

93 points by notamy 7 hours ago | 54 comments

schiffern 7 hours ago

Unrealistic; in minesweeper it's impossible to hit a mine on your first click. ;)

https://gaming.stackexchange.com/questions/315335/is-it-poss...

CobrastanJorji 6 hours ago

Your link suggests: "If a mine is under the first clicked tile, it is moved to the upper-left corner, if the upper left corner is occupied, the mine moves to the right of the corner tile." If that happened here, the square would still be a mine.

raldi 6 hours ago

What if the upper-left corner and the one to its right are mined?

bwen 6 hours ago

"The function checks if it is the first click, and that the square being clicked is a mine. It then tries to move the mine to the upper-left corner. If unsuccessful it tries the square to the right of it. If all of the first row is occupied by mines, the function tries to put the mine in the leftmost square of the row below, and so on."

https://web.archive.org/web/20180618103640/http://www.techus...

throwawayk7h 6 hours ago

What does the function do if the entire board is mines?

j5155 4 hours ago

See https://www.youtube.com/watch?v=0-REcpPz3vw It causes some strange bugs to occur!

jraph 6 hours ago

An array out of bounds access.

berkes 5 hours ago

Found the tester :)

Jokes aside, I love it how in a group of software engineers someone can always think of an even more unlikely, but somehow realistic edge case.

For me, one of the marks of a senior engineer would be to then either go "we'll just not allow the board to be filled with entirely mines in the builder", or "well, if that ever happens: just let it crash". A practical solution to a theoretical case. Whereas the more junior engineer would spend the next few days researching and refactoring the algorithm to address this case. Obv. "it depends", letting my insuline pump "just crash" isn't cool, but minesweeper, meh.

dutzi 5 hours ago

It BSODs!

KHRZ 6 hours ago

In Minesweeper you also win when all non-mine tiles are revealed.

encomiast 6 hours ago

A strange game. The only winning move is not to play.

wging 6 hours ago

In this case, you win by flagging all the mines. That isn't how winmine worked -- you just had to uncover all non-mine spaces.

animal531 3 hours ago

It would have been funnier if when you flag it the game turns it into a number and you lose anyway.

m463 5 hours ago

you're confusing minesweeper with nuclear disarmament.

exolab 3 hours ago

catlikesshrimp 3 hours ago

Gambling? :)

joshka 7 hours ago

I can't get the xyzzy cheat[1] to work. How am I going to tell if there is a bomb or not?

[1]: https://minesweepergame.com/history/xyzzy.php

Dylan16807 6 hours ago

Oh cool. Also it's really funny that the blog is cutting off the corners on the main image.

UberFly 5 hours ago

This game painfully reminds me of my dating attempts as a teenager.

eru 5 hours ago

Just flag and you win instantly?

sulandor 5 hours ago

probably also depends on the kind of flag