Thursday 28 November 2013

placeMines()

I made a placeMines method which will randomly place the mines somewhere in the mineField by using Math.Random and a do while loop which will randomly place those mines as long as mineNum isn't equal to 9 since the 9s are where there are mines and a mine shouldn't be placed over a mine. This placeMines() is then put into the game() so that it would be called whenever the user decides to play the game.

No comments:

Post a Comment