6 kyu
Get Password from grid
356 of 743kodejuice
Loading description...
Logic
Arrays
Algorithms
Data Structures
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.
js fork 🤖🤖🤖
mocha/chai
assertions +lodash
for randomnessapproved
Can the password be empty (eg: no 'T' at the end of directions) ? Can
grid
be 1x1 and/or candirections
be empty (thus password would also be empty) ?I'd like to translate the kata and I think these cases could be interesting but I don't know if I should implement them or not. I also think it could be added to the description.
python new test framework is required. updated in this fork
Approved
In PHP:
Corrected Here
Merged the fork with the fix.
This does not qualify for the
BUGS
tagTags on katas are generated automatically. Tags which do not match katas are quite common, however this is a fault of the tag system itself, and is not a kata issue.
done there
Ruby translation
Please reveiw and approve.
Ruby translation
Please review and approve.
Python translation
Please review and approve.
Shouldn't be labeled as
bugs
Can yoг explain in simle words - what is left(top etc) and leftT(topT etc) in this cata?
If a direction (left, right, up, or down) has a "T" at the end, it means you're supposed to move in that direction and then add the letter you land on to the password. If it's not there, you move but don't add to the password.
After the changes you implemented, I pass the test, and then I get this error ... "ReferenceError: currDir is not defined"
Fixed
Nice work on the random tests.. great Kata :)
Really nice kata, but it needs more test cases in my opinion.
Done, had plans to do that earlier, buh i totally forgot
Very interesting kata. Never seen anything like this, so good job!
Others have given the suggestions I would've made.
Needs random tests. (Really, you basically never get away with not providing random tests. Just save us the trouble of complaining, please! )
Also,
Test.assertEquals
seems more appropriate thanTest.assertSimilar
and gives cleaner output.Other than that, nice kata.
You are late ;-)
And my solution is not a functional one-liner either. :S I must be losing my touch. :D
One issue raised is enough. Let me close this one.
1.Needs some random tests 2.A typo in the description:
lefT
should beleftT
3.Perhaps need to clarify: If the current position is on the left edge, what is the result of executing the command "left"? Shift to the right or nothing happens? (If you write the random tests, you will face this situation )I have the same question, if the current position is at any edge and the specified move would put you off the grid, is that an error (if so, what should be returned) or does the position just remain the same (no move made and no character collected for the password string). I ask only because it is a habit to cover really obvious edge cases (even if not asked to).
This reminds of the Day 2 problem of Advent of Code 2016.
Please can you provide d link lemme see
https://www.adventofcode.com/2016/day/2
(also, every AoC task has two parts, one following the other. The second part deals with non-rectangular grids.)
Great kata :-)