6 kyu
What positions are covered?
Loading description...
Algorithms
Matrix
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.
Very nice kata of the chess series for the record.
Test cases - Random test:
Fixed!
Well done on adding the knight!
If you want to use chess notation like you were using for the king, queen bishop and rook, the knights notation is "N" but other than that nice kata
I've changed it to N
Has been resolved
The first point, yes resolved. But you haven't resolved the second point (the ref sol printing to console).
What is the problem with that? There are random tests so you can't hardcode
I think you forgot some of the knight's movements?
For
pos = f6, piece = H
A more clear view:
Should be an issue.
Thanks for noticing, it should be fixed now
I enjoyed solving this but I think you should include the knight especially because the estimated rank is quite high
The knight has been implemented
is there a reason why the knight isn't included?
I somehow forgot it existed...
Your king can't move diagonally.
Forgot about that, fixed it
Now the king in a8 move to h8.
should be fixed now, thanks for letting me know
None
or[ ]
) crash, while they should fail more gracefully.Random test cases: will work on that this evening/tomorrow Solutions in unexpected forms: Would those really happen as users start with the matrix?
It can happen, especially in Python where all it takes is a missed branch in
if
to fall out of the function with implicitreturn None
.Random tests have been implemented
How should i go about adding error messages for things like None and []
Tests for returning None, returning empty chessboard, returning [] have been implementend