sei-ec-remote / project-1-issues

Open new issues here
1 stars 2 forks source link

minesweeper #171

Closed kxiside closed 1 year ago

kxiside commented 1 year ago

What's the problem you're trying to solve?

i honestly am having a hard time creating the logic for the game

Post any code you think might be relevant (one fenced block per file)

If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?

i got to this point but im confused on how to finish the game

What is your best guess as to the source of the problem?

maybe i dont understand the game enough..

What things have you already tried to solve the problem?

ive tried several different ways and stilll having problems

Paste a link to your repository here

https://github.com/kxiside/starsweeper

timmshinbone commented 1 year ago

Hey Kai, here's what I want you to do, take the time to make a list of all the things that happen, in order, when a person plays a minesweeper game, and send that list here as a reply. This will help us write the pseudo code, and eventually turn that into actual code.

kxiside commented 1 year ago
  1. generate board
  2. start timer on first click
  3. click a cell to reveal a mine or number
  4. number will count how many mines are within 1 cell
  5. place flags to save as bomb guesses
  6. flag placements will subtract from the mine count. As well as increase mine count when taken off cell
  7. if mine is clicked game over
  8. if all cells are clicked with only mines left game is won
  9. click play again to reset board
timmshinbone commented 1 year ago

Ok, so, the next step is to take things that are ready to turn to code and turn those into code(things like generate board), and take the other steps that could be detailed even more and break them down into other steps. For example, click a cell to reveal, and click to place a flag are two different actions tied to a similar event, how will you distinguish between them? Also, how will your squares know if they are a mine, next to a mine, or know how many mines are around them? You can start by testing your clicks with console logs to ensure the functionality is working. Let's plan to meet up in the morning and chat about where you're at in your progress, and how we can get your game over the finish line!

If you want to, you can break those other steps down even further and reply here with the more detailed list, so we can keep brainstorming.

kxiside commented 1 year ago

yah i would really like to get your advice tomorrow morning. hopefully i have a decent amount of code finished tonight so i wont be too far behind. ill send a detailed list after class when i get back to my computer