PDA

View Full Version : [DHTML] Minesweeper



mburt
03-29-2007, 04:30 PM
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

DimX
03-29-2007, 06:43 PM
Nice, but in a the real "Minesweeper" there are numbers on opened squares that indicate number of bombs around that square.

mburt
03-29-2007, 10:25 PM
Point taken... I'm not really sure how I would implement that effect... seems fairly complex.

Twey
03-29-2007, 11:02 PM
Doesn't really work very well... at least in Konqueror.

djr33
03-30-2007, 03:59 AM
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.

boogyman
04-09-2007, 04:21 AM
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

djr33
04-09-2007, 11:16 AM
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.

mburt
04-09-2007, 01:57 PM
I'll try to work on the updgrades... I don't really know where to start, but I'll try.