Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python Minesweeper

Name: Anonymous 2008-11-16 17:37

I have a programming project due tomorrow at midnight and I am supposed to make a minesweeper game using a class.
The game board is 5X5 and should have 5 mines randomly placed on the grid. Basically there will be two grids(one that holds the data for mines and how many mines are near each space, and another that is the players view)which should just be a list of lists. The player view grid should start out showing an 'H' in each spot till they are removed by player input.
Example below

Actual Grid  Player View
0 1 1 1 1     H H 1 0 1
1 M 1 2 M     1 H 1 0 H
3 3 2 2 M     H H 2 0 H
M M 1 1 1     H H 1 0 1
2 2 1 0 0     H H 1 0 0


Also, if the player should choose a spot that contains a 0(there are no mines in its neighborhood) the program should also reveal all the other adjacent 0's if any.

Please, any help is greatly appreciated

Name: Anonymous 2008-11-16 18:05

I've been studying for the past 48 hours for a big Circuits exam for another class. once I'm done with that exam at 9am tomorrow, I'm getting right to work on this program, so any help to start would really help

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List