Results 1 to 8 of 8

Thread: [DHTML] Minesweeper

  1. #1
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default [DHTML] Minesweeper

    1) CODE TITLE: Minesweeper

    2) AUTHOR NAME/NOTES: Michael Burt (http://mburt.funpic.org)

    3) DESCRIPTION: This is a simple game with a 13*13 grid, where you click on the quares. A random 35 (or any number you choose) squares will be placed on the grid, and if you click on them, boom, the mine explodes, the game is over .

    4) URL TO CODE: http://mburt.funpic.org/projects/minesweeper/code.php
    URL TO DEMO: http://mburt.funpic.org/projects/minesweeper
    - Mike

  2. #2
    Join Date
    Jun 2006
    Posts
    182
    Thanks
    0
    Thanked 14 Times in 14 Posts

    Default

    Nice, but in a the real "Minesweeper" there are numbers on opened squares that indicate number of bombs around that square.

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Point taken... I'm not really sure how I would implement that effect... seems fairly complex.
    - Mike

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Doesn't really work very well... at least in Konqueror.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Doing the numbers is necessary.
    Works fine in FF, but the lack of numbers makes it no fun.

    Here's how to do numbers--
    Use a grid setup and then check if the surrounding boxes are mines; if so, then add one to the number for that square. After all surrounding boxes are checked, then display the number. The end.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    also how about giving the user an option of how many mines to place ? if this is in javascript could just do a prompt dialog then convert it to a number and go from there

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Start by figuring out the numbers, then adding in a user-based number of mines shouldn't be too difficult. And user-chosen size of the grid after that.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I'll try to work on the updgrades... I don't really know where to start, but I'll try.
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •