Beta
Searching for Bulls
Loading description...
Puzzles
Games
Permutations
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Nice kata, thank you!
So how different is it from this kata? https://www.codewars.com/kata/58a848258a6909dd35000003
Thanks for the search. Same underlying concept however the linked one has you playing a game yourself via contstruction of an object. This one has you tracking a simulated game, so enough of a variation I think.
Hi,
Your random tests are still totally useless... :o
That solution solves for the 3 hidden static tests, but there's 30 randomized tests after that that this would fail, right?
Edit: Blind4Basics, apologies you're right. Was testing against itself... hard to fail that. Have corrected the code, now fails appropriately. Thanks for noting.
no, it's valid, as you can see. And that's the point: you random tests never generate valid situations.
In the classic version the digits are unique; they aren't here, so the rules should be stated more clearly. I see 9 cows here: 3
1
s match 21
s each and 11
matches 31
s.Thanks - had overlooked the uniqueness description of the original game. I've amended the description to classify it as a variation and made the repetition of numbers more clear.
So what about counting cows? "[C]orrect numbers but in incorrect places" is ambiguous. Depending on the rules, each
1
in one number the example above can match each1
in the other number except where it's a bull.Do NOT put solutions in the complete test WITHOUT renaming it
Ah - hadn't been aware of that. Noted and fixed, thanks.