Land Mines

This is a discussion on Land Mines within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I am presently re-creating minesweaper game.. (using crappy BGI in concole).. I am struck here In minesweaper when i click ...

  1. #1
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683

    Land Mines

    I am presently re-creating minesweaper game.. (using crappy BGI in concole)..

    I am struck here

    In minesweaper when i click some blocks many blocks are automatically cleared.. WHat is the logic behind this clearing.. Is it just random or what..

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,789
    I believe they are automatically cleared for you if there are no mines nearby, i.e. the number displayed in that cell, if it were to be shown at all, would be zero.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    hmm.. a little more precise would help..

  4. #4
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    The blocks clear when you click on a spot that is touching no mines. What happens is that it automatically clicks on all spots around this empty cell, and if THAT hits an empty cell then it repeats it for that spot. This continues until all available spots are clicked.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21