-
-
Notifications
You must be signed in to change notification settings - Fork 69
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 new practice exercise dominoes #750
Conversation
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.
I think my personal preference would be the simpler true/false option
I've change the testing to the alternate |
Could you revert this change? The instructions are synced from https://github.com/exercism/problem-specifications, so if they need to be improved they should be improved there. What you are allowed to do, is to create an |
I've reverted the changes to |
There are two suggestions for testing in the problem specifications. The more rigorous choice, of testing
a returned chain for validity, was used here in
runtests.jl
and requires a helper function to evaluate the users function. Main points:Below is another implementation of the algorithm which simply returns true/false if a chain is possible.
The accompanying test set is below that. The change to the algorithm below is very minor, but this change may still be easier for some students. Due to this change being for less experienced students I have explicitly tested as
@test dominoes(input) == true/false
for clarity, instead of using the return value directly (i.e.@test dominoes(input)/!dominoes(input))
. This points at another potential benefit which is that no helper function is needed for testing the validity of the chain.Alternate
example.jl
:Alternate testset for above algo: