Friday 13 December 2013

Flowchart and Recursion

I started working on the flow chart today as one of my documentations. It's on paper, with a lot of arrows flying all over the place but I'm going to redo it on Smart Ideas.

Previously, my program gave me an error saying that I was going outside of the loop (when I was making the if statements for the recursion part of my program), which I tried to fix. Now when I run the program, it doesn't give me that error but there's obviously something still wrong since all the squares become revealed when I click on one of them. Which isn't supposed to happen since there are supposed to be mines randomly placed all over the 15 x 15 field.

I also made a JOptionPane that says "You hit a mine" appear whenever the user clicks on a square whose mineNum is equal to 9. Though now it simply continues to pop up even after the OK button has been pressed. Which is another error. I also need to make a reset method that I can call to reset all the mines and make all the buttons revealed=false again.


No comments:

Post a Comment