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

Improve the zebra-puzzle. #960

Merged

Conversation

siebenschlaefer
Copy link
Contributor

Following the discussion at #959 (comment), this PR changes the API of the solution. Instead of two formally independent functions for the two sub-tasks the tests now require a single function that returns a struct with the two answers. That should reduce the boilerplate that students will have to write.

It also improves some small details of the example solution.

typedef struct {
const char *drinks_water;
const char *owns_zebra;
} solution_t;
Copy link
Member

Choose a reason for hiding this comment

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

Can you update the type elsewhere? Now this doesn't match the prototype below or the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry

Copy link
Member

Choose a reason for hiding this comment

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

No worries!

Copy link
Member

@ryanplusplus ryanplusplus left a comment

Choose a reason for hiding this comment

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

Thanks!

@ryanplusplus ryanplusplus merged commit 59efe93 into exercism:main Mar 2, 2024
4 checks passed
@siebenschlaefer siebenschlaefer deleted the improve-exercise-zebra-puzzle branch March 2, 2024 18:06
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