Look at it as if you are on a transparent roof and you are looking down into a room. A wants to move across the room in a straight line to reach B. The walls are at some distance away from this straight line. The distance is what you get in the input parameter of the kata. For each step A takes towards B, the walls W also move one step closer.
The 'W' is just a visualisation, it is not part of the kata. You get an array of values like this [2,3], which means the north wall is 2 units away from the center of the room and the south wall 3 units.
The last example in the description (We stand no chance) depicts the following configuration of walls: [[4, 4], [2, 2], [4, 4]]. But it should be [[3, 3], [1, 1], [3, 3]].
2000 Tests? :D
Java translation
Thanks for the comment. Firstly I started to count this '-'.
Look at it as if you are on a transparent roof and you are looking down into a room.
A
wants to move across the room in a straight line to reachB
. The walls are at some distance away from this straight line. The distance is what you get in the input parameter of the kata. For each step A takes towards B, the walls W also move one step closer.(You don't need to flag these questions as spoiler.)
The 'W' is just a visualisation, it is not part of the kata. You get an array of values like this
[2,3]
, which means the north wall is 2 units away from the center of the room and the south wall 3 units.the position of the W (w.. .w. ..w) or how many are (w.. ww. www) have any ralation with the kata or is random? sorry my english...
Not before my upcoming ASCII kata's about Roman Army units :p
fixed
The last example in the description (We stand no chance) depicts the following configuration of walls:
[[4, 4], [2, 2], [4, 4]]
. But it should be[[3, 3], [1, 1], [3, 3]]
.Nice kata, that was entertaining to solve.
great
Hi, I just noticed the typo. I have made the modifications, please check again. Thanks.
The 4th row in the 3rd Sample Test has 11 chars.
just saw this, but sure
Loading more items...