Crack out the bug spray!
Regressions a plenty! Undermined is having a severe refactor to get its working, but ugly and sometimes safari-munting searching algorithm replaced with a new nicer, iterative one! (geeks: recursive depth first being replaced with breadth first). Current issues include but not limited too:
- When displaying many squares of the board at once because they are empty and have no neighbors (thats the search edges - cells that have neighboring mines) not all cells are revealed.
- Sometimes reveals mines as well (?!). Seems to happen going 'down' the board but not in any other direction. Search order??
- While the 'middle click' isn't picked up yet, you can fake it with alt, command/apple or meta. don't its even more broken than the normal reveal!
Please leave comments/bug reports or inspect the source and tell me i'm a munt/provide patches etc! The primary file to concern yourself with is 'game.js', and the MineSquare method (its on the prototype) 'reveal'.
Comments
Brehaut
Well, its more fixed than it was - it shouldn't be showing the mines any longer, but 1 in about 20ish times it doesn't completely reveal all the blank space.
Brehaut
Whoops, the test condition for the loop was at the wrong end (for some reason - think i shall blame 1:30am - i was using a do { ââ¬Â¦ } while (ââ¬Â¦);
rather than a while (ââ¬Â¦) {ââ¬Â¦}.)
Anyway, the regular mine reveal method should now be working fine in all cases. Its running somewhat inefficently though, need to check if the place has been visited before putting it in the queue (currently cheating and checking when it comes out)
Brehaut
It also appears that 'middle' clicking for mass reveal is now working 90% of the time. Probably just a slacker bug there. And it can probably be written better. Please try it out
