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.

Wednesday 20 November 2013

Button2

I forgot that you can't use the same button twice in two different places... so that was the problem. I just made a second menu button and it works fine now that I've added a MouseListener to it, and added it to the mouseClicked method.
I'm also finished with the instructions frame. It includes how to play it and what the left and right mouse clicks will do when clicking on the minefield.

Tuesday 19 November 2013

Instructions

I found a problem with the gameFrame last time but it's fixed now. I've decided to just make the different frames visible or invisible, which is actually easier than what I was doing before.
My menu button isn't showing up for some reason.

Thursday 14 November 2013

Minefield

Didn't do much but set up the minefield for minesweeper.
Oh, and I also changed the JButtons to Buttons which extends JButtons. I can put info for each button in that class. It includes private variables for mineNum and revealed, which will tell me whether or not a button has been revealed yet.