Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hi Adrian,
Thanks for the interesting kata!
You wrote to Animoni that the maze 2 replies above and the following directions should return 'Lost':
Test.assert_equals(maze_runner(maze,["N","N","N","E"]), "Lost", "Should return Lost")
I totally agree, but when I attempt to test it, I am getting this error: "Expected outcome to be Dead: expected 'Lost' to equal 'Dead'". How could the expected answer be 'Dead'?
Thanks.
Cool, nice one :-)
Hi @animoni, it looks like your code is return
nil
but not sure why without looking at it :-) if you want you could post your code here and mark as spoiler and I can try and solve it :-)The final test cases (in every language) are below then lots of random tests.
Hi Animoni. Which language? please provide more info on the test case. :-)
Same here:( That is the only fail I have :(
Fair comment.
The use of short or obvious variable names in the Kata Test Cases in Python increases the chance of problems due to collisions with user solutions' choices for their variable names, and it's difficult to debug when this happens. Please try to use as few global variables as possible, and use long, non-obvious variable names and/or store them inside of a single variable or object.
Ah, thanks!
Once you've solved a kata you can click on the
language drop down menu
from theDetails Page
and select+ Add New
. This should open the kata for editing. Once complete the Kata Sensei can approve/reject the translations. Hope this helps :-)Thanks for making it! It was a good challenge :)
Out of interest, I'm quite new and I'm not sure how I can translate Katas. Do you know at all?
Cool, nice one :-), thanks for solving.
Thanks for this reply @zebulan, hope it helps @Edwuards1327
Hi there, yeah sorry, Python isn't my strongest language so I made a translation for version 3.
If you want to translate, please feel free to submit a version. :-)
@Edwuards1327
,You need brackets after
if(el.indexOf(2) != -1)
because it's more than one line.This line causes your other error:
var current = maze[vertical][horizontal];
One way to fix it is to catch the error and return 'Dead' if it comes up. I mostly write Python so this may not be the proper way to handle this in JS (but it works).
With those two minor changes, your solution passes.
Hopefully that helps!
@adrian.eyre
,Python 2 isn't available.
Loading more items...