Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Step 1: make a (10x10) 2D array for the board
  2.  
  3. Step 2: generate the board
  4. -first, set everything to the empty character, we can use '-'
  5.  
  6. Step 3: get the first user input
  7. -now fully generate the board
  8. -make sure no bombs surround the spot the user clicks
  9. -generate (20) bombs around the board
  10. -for every OTHER spot, put a number on the board to represent how many bombs are around it
  11.  
  12. Step 4:
  13. -we will need THREE total boards for this game to run
  14. -the 'solution board' -> the true data at each spot
  15. -the 'user board' -> what the user sees
  16. -the 'seen board' -> keeps track of the spots the user has seen 0, 1
  17.  
  18. 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
  19.  
  20. Step 5.5: Clicking on empty spots reveals the spots around
  21.  
  22. Step 6: Allow the use to place/remove flags, if the user puts a flag on every bomb, you win
  23.  
  24. Step 7: If you click on a bomb, terminate the game
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement