Skip to content

[New Exercise] Add word-search exercise #867

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

Merged
merged 5 commits into from
Jul 14, 2025

Conversation

Sencudra
Copy link
Contributor

No description provided.

Copy link
Contributor

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/cross-track-maintainers)

@Sencudra Sencudra changed the title [New Exercise] Add word search exercise [New Exercise] Add word-search exercise Jul 11, 2025
config.json Outdated
"uuid": "e88da49b-37d7-4f84-ad64-765fb464a721",
"practices": [],
"prerequisites": [],
"difficulty": 4,
Copy link
Member

Choose a reason for hiding this comment

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

I would increase the difficulty to at least 5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Done.

}
}

extension WordLocation {
Copy link
Member

Choose a reason for hiding this comment

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

I get the idea that putting this in the source file would clutter it quite a bit.

I think a better approach would be to put this whole struct as a whole in a separate source file. As you can see being done here: https://github.com/exercism/swift/tree/main/exercises/practice/saddle-points/Sources/SaddlePoints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get the idea that putting this in the source file would clutter it quite a bit.

The idea here is slightly different. Sometimes, you need a helper function specifically for testing, and you don’t want it to be part of the main codebase. In this case, it’s a fileprivate extension to the WordLocation struct that provides an alternative initializer used only for tests. That’s why it was located in a test file and was marked as fileprivate.

Now, I think it would be a good idea not to pollute the template.swift with this extension. Instead, I moved it to a separate file within the Tests module.

I think a better approach would be to put this whole struct as a whole in a separate source file.

That looks much more natural. Done.

@meatball133 meatball133 merged commit 6daece8 into exercism:main Jul 14, 2025
20 of 43 checks passed
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