-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Improve the zebra-puzzle. #960
Conversation
Co-authored-by: Ryan Hartlage <[email protected]>
typedef struct { | ||
const char *drinks_water; | ||
const char *owns_zebra; | ||
} solution_t; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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.