Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step 1: make a (10x10) 2D array for the board
- Step 2: generate the board
- -first, set everything to the empty character, we can use '-'
- Step 3: get the first user input
- -now fully generate the board
- -make sure no bombs surround the spot the user clicks
- -generate (20) bombs around the board
- -for every OTHER spot, put a number on the board to represent how many bombs are around it
- Step 4:
- -we will need THREE total boards for this game to run
- -the 'solution board' -> the true data at each spot
- -the 'user board' -> what the user sees
- -the 'seen board' -> keeps track of the spots the user has seen 0, 1
- Step 5: allow the user to type in coordinates (should be implemented already in step 3 to get first user input) to check through all the spots on the board -> reveal when you click
- Step 5.5: Clicking on empty spots reveals the spots around
- Step 6: Allow the use to place/remove flags, if the user puts a flag on every bomb, you win
- Step 7: If you click on a bomb, terminate the game
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement