TDWTF Plays Minesweeper
-
Commands (e.g.):
reveal a1
flag b2
unflag c3
-
New game.
-
@error_bot reveal h5
-
Ā
Ā
-
@error_bot new game
-
@error_bot reveal L13
-
New game.
-
Ā
Ā
-
@error_bot reveal Z27
-
@error_bot new game
-
New game.
-
Wanted: mine, explosion, and flag graphics in SVG.
-
@error_bot Reveal q17
-
@Vixen Stop going out of bounds.
-
@error said in TDWTF Plays Minesweeper:
@Vixen Stop going out of bounds.
stop wrotong bots that are vulnerable to array our of bounds errors!
:-P
@error_bot reveal a0
-
@Vixen said in TDWTF Plays Minesweeper:
stop wrotong bots that are vulnerable to array our of bounds errors!
Hm? https://github.com/errorx666/error-bot/blob/master/src/modules/minesweeper.tsx#L524
if( isNaN( xCoord ) || isNaN( yCoord ) || xCoord < 0 || yCoord < 0 || xCoord >= gameContext.width || yCoord >= gameContext.height ) return;
-
@error said in TDWTF Plays Minesweeper:
@Vixen said in TDWTF Plays Minesweeper:
stop wrotong bots that are vulnerable to array our of bounds errors!
Hm? https://github.com/errorx666/error-bot/blob/master/src/modules/minesweeper.tsx#L524
if( isNaN( xCoord ) || isNaN( yCoord ) || xCoord < 0 || yCoord < 0 || xCoord >= gameContext.width || yCoord >= gameContext.height ) return;
no fair haistily adding that after I try to exploit it!
:ālaughing_foxā:
-
@Vixen If only there was a log of all changes made to the file, publicly accessible to everyone.
-
@error said in TDWTF Plays Minesweeper:
@Vixen If only there was a log of all changes made to the file, publicly accessible to everyone.
if only i cared to check the log.
-
-
@error_bot reveal k11
-
Ā
Ā
-
@r10pez10 said in TDWTF Plays Minesweeper:
That's two PNGs and a webfont glyph rather than the SVGs which requested.
-
@error said in TDWTF Plays Minesweeper:
Wanted: mine, explosion, and flag graphics in SVG.
Super quick Google effort (I haven't checked the licenses or size of the image):
Flag:
Mine:
http://clipartist.net/svg/sea-mine-black-white-line-super-duper-svg/
Explosion:
-
Feature idea: "auto reveal" like clicking both mouse buttons. If it's on a number with the correct number of flags around it, it reveals the neighbouring squares.
-
@hungrier said in TDWTF Plays Minesweeper:
Feature idea: "auto reveal" like clicking both mouse buttons. If it's on a number with the correct number of flags around it, it reveals the neighbouring squares.
backlog
-
@hungrier TIL.
-
@error_bot reveal r11
-
@error_bot reveal j11
-
You lose!
-
New game.
-
@error_bot reveal k9
-
Ā
Ā
-
@error_bot reveal h7
-
Ā
Ā
-
FFS. Maybe the mine density is set too high.
-
@error I think the standard amount for a 16x16 grid is 40 mines.
My challenge asked for the first opened cell to not have any neighbouring mines, because this speeds up the start of the game. My own strategy used to be making a 2xN corridor until I got useful patterns at the sides, but probably plenty of people peck randomly until they get a larger open area, and in general it's just more convenient if you get a larger area right away.
Additionally there are plenty of 3x3 open area options which can leave you completely clueless. Like this one:
1 1 1 1 1 1 1 1
-
@PleegWat said in TDWTF Plays Minesweeper:
@error I think the standard amount for a 16x16 grid is 40 mines.
My challenge asked for the first opened cell to not have any neighbouring mines, because this speeds up the start of the game. My own strategy used to be making a 2xN corridor until I got useful patterns at the sides, but probably plenty of people peck randomly until they get a larger open area, and in general it's just more convenient if you get a larger area right away.
Additionally there are plenty of 3x3 open area options which can leave you completely clueless. Like this one:
1 1 1 1 1 1 1 1
The algorithm I submitted to your challenge is to lazy-generate the mines on first click, then take all the possible squares (all squares except the clicked one) and shuffle them into a deck of cards (Fisher-Yates) and draw n "cards."
Edit: I missed the part about "no surrounding mines." The algorithm above is quite amenable to that, though.
-
@PleegWat said in TDWTF Plays Minesweeper:
@error I think the standard amount for a 16x16 grid is 40 mines.
That works out to 15.625% mine density. Much less than my 40%!
-
@error_bot new game
-
New game.
-
@error_bot reveal m7
-
You lose!
-
New game.
-
I broke my isAdjacent algorithm. Reverting...
-
@error_bot reveal h6
-
Ā
Ā
-
OK, that looks a lot better.
Lower mine density, and no mines around the starting square, as specified.
-
@error_bot flag g13
flag h13
flag h14
flag f8
flag h9
flag c12
reveal c13
reveal c14
flag c15
reveal c16
flag b7
reveal a7
flag h4
flag h3
reveal h2
-
Ā
Ā