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.
85 chars, but is not always working (random tests can fail)
Yes, random order of fixed elements are not really acceptable nowadays.
Changed it to
escape(Actions)
.There is some randomization in the order of mazes. Would you say it needs real random mazes as well?
That's a very bad argument. If clearly the result of
escape
depends entirely onAction
, it should be passed as a parameter. Making it a global object is just code smell.Needs random tests by the way. All the mazes are fixed.
The main part of this kata is not to find an algorithm for blind pathfinding. It is to adapt to the different results you only get as a string.
That's part of the exploration. This is mainly a puzzle.
I could pass the Actions object as a parameter
escape(Actions)
, but it would not change the solution at all. The following two would virtually be the same, but with the global object you don't have to pass down the Actions to helper functions.Fixed it
The kata design should be changed. For starters,
Actions
should not be a global object: it should be passed into the user function as a parameter.If you want to hide its implementation for the sample tests, just generate one in Preloaded and give that to the user.
If this were an interactive game, I'd see things being part of the puzzle. But for this kata, I think it makes more sense to specify what one can encounter. You don't have to specify all the possible interactions between items and surroundings, but the basics of what we should program for should be specified.
You need to change the setup of your tests: currently, the tests never stop in a maze and you're sending thousands of assertions
You are dead. You crashed into a wall.
that are totally useless... and make the browser choke to death => write your tests so that the testing process is stopped for a mase as soon as the first wall is stepped on.no, this is just bad specifications of the problem... ;p
You're only annoying the users, doing so: forcing to print stuff to the console while you could have just said what the possibilities are.
That is part of the puzzle
Loading more items...