Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add practice exercise minesweeper #666

Merged
merged 1 commit into from
Mar 10, 2024
Merged

Add practice exercise minesweeper #666

merged 1 commit into from
Mar 10, 2024

Conversation

jiegillet
Copy link
Contributor

Here's another one, while I was at it...
This is week 18 of 48in24.

Some small points of note:

  • I didn't implement one test with a contrived empty board ("\n"), because there was already a perfectly good one ("")
  • The boards look very ugly in the tests, but they are in the representation that makes the most sense to me

Copy link
Contributor

@ceddlyburge ceddlyburge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try to solve the exercise, but it all looks good to me ...


Minesweeper is a popular game where the user has to find the mines using numeric hints that indicate how many mines are directly adjacent (horizontally, vertically, diagonally) to a square.

In this exercise you have to create some code that counts the number of mines adjacent to a given empty square and replaces that square with the count.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In this exercise you have to create some code that counts the number of mines adjacent to a given empty square and replaces that square with the count.
In this exercise you have to create some code that counts the number of mines adjacent to a given empty square and replace that square with the count.

I realise this probably comes from the problem-specifications, but this looks like a typo to me.

Copy link
Contributor Author

@jiegillet jiegillet Mar 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a little awkward, but I think it's correct:

you have to create some code that counts [...] and replaces [...]

@jiegillet jiegillet merged commit 51ebd1c into main Mar 10, 2024
7 checks passed
@jiegillet jiegillet deleted the jie-minesweeper branch March 10, 2024 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants