This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
M4sh3dP0t4t03's profile picture

Minesweeper for CC

Started by M4sh3dP0t4t03, 07 July 2013 - 05:30 AM
M4sh3dP0t4t03 #1
Posted 07 July 2013 - 07:30 AM
I was bored lately so I played some minesweeper and thought "Hey, why don't I make minesweeper in CC?", so I just made it.
This isn't making visible any fields adjacent to fields with 0 mines adjacent to them, because every time I tried to implement it, it ended up in a stackoverflow. Currently you have to do it yourself(easiest by clicking on the 0's), but I will try this again for the next version.

Screenies:
Spoiler

Pastebin:
http://pastebin.com/B0SMFZzx
Yevano #2
Posted 07 July 2013 - 11:39 AM
it ended up in a stackoverflow


Probably because your search algorithm looks for adjacent squares and immediately searches squares multiple times. When I implemented this, I used a blacklist to keep track of tiles which had already been searched so as not to search them more than once.
M4sh3dP0t4t03 #3
Posted 07 July 2013 - 12:27 PM
it ended up in a stackoverflow


Probably because your search algorithm looks for adjacent squares and immediately searches squares multiple times. When I implemented this, I used a blacklist to keep track of tiles which had already been searched so as not to search them more than once.
I also tried a blacklist, but it didn't work(I think I have done something wrong about it, but after I spend ca. 5 hours with searching for the mistake I just didn't wanted to search longer).
vonaHD #4
Posted 08 July 2013 - 02:08 PM
That is a really Nice Game ! :lol:/>
ElectricOverride #5
Posted 12 July 2013 - 10:38 AM
Great job on this! :D/>