# [Community Puzzle] Maze for the Champions

Coding Games and Programming Challenges to Code Better

Created by @nguyen.lam,validated by @Regulus136,@Timinator and @ANONYMOUS42.
If you have any issues, feel free to ping them.

If an Elf is to complete this map:

``````5
5
#####
>...#
#...#
##..>
#####

``````

would the path be:

``````#####
>...#
#o..#
##o>>
#####
``````

I see you have solved the puzzle so you probably already know the answer but in the statement it says about the elf:

When both give same result, prioritize straight moves as opposed to diagonal moves.

So the correct path should be:

#####
>>o.#
#â€¦o#
##â€¦>
#####

1 Like

Hi,

Iâ€™m in trouble to understand the path in the solution of the test 8:

If I take the possibility to turn while destroying the wall, I find this solution :

``````####################
#....#..#...#...##.#
#.##......#...#...##
#..##############..#
#.#.###.##########.#
#.....#######...##.#
#####.#.#.#.###.#..#
<<....######.#.#..##
#^#############.#..#
#^<##############..#
##^..##...##......##
##^#....#....#######
#>^#################
#^.###############.#
#^##.........##.#.##
#^##.#.#.###.##..#.#
#^##.###.###.##..#.#
#^<v<<<<<<<<<<#.#.##
#.^<.####.##.^...#.#
#############^######
``````

and then the result on test 4 is :

``````###########
#....#....#
#...#.#...#
#..#####..#
#..#####..#
#.###.###.#
>>v##.##>>>
#.>>>>>>^.#
#...###...#
#..#...#..#
#..#...#..#
#....#....#
###########
``````

now if I consider the turn not possible, test 4 is then ok and the test 8 is then :

``````####################
#....#..#...#...##.#
#.##...v<<<<<<<<<<##
#..####v#########^<#
#.#.###v##########^#
#.v<<<#v#####...##^#
##v##^<<#.#.###>>>^#
<<<...######.#.^..##
###############^#..#
#.#############^#..#
##...##...##>>>^..##
##>>>>>>>>>>^#######
##^#################
#>^###############.#
#^##.........##.#.##
#^##.#.#.###.##..#.#
#^##.###.###.##..#.#
#^##v<<<<<<<<##.#.##
#^<<<####.##^<...#.#
#############^######
``````

On top of this the part of the solution path (r7 c13) (r6 c13) and (r6 c12) is very strange to me as it means to destroy the wall 3 times, at first read it seems not aligned with â€śThe DWARF can break walls if the wall thickness is only 1 cell.â€ť

To me this part of the puzzle is far from beeing clear.

The way I implemented â€śwall thickness is only 1 cellâ€ť is that, once a direction is chosen, I look two squares ahead, and if the immediately next one is a â€ś#â€ť and the next one a â€ś.â€ť, then I can break it and move to the â€ś#â€ť.

So in your first example, this is illegal to me:

``````#^##.#
#^<v<<
#.^<.#
######
``````

(From the original maze of:

``````#.##.#
#.##.#
#....#
######
``````

)

I allow myself to â€śturnâ€ť (as in to explore the 4 directions allowed to the DWARF), at each turn, including after just destroying a wall.

Yes after a first implementation and a second as explained in my earlier message, I figured out the real puzzle request but I think it would be worth to clarify this point for next players.

rgds

Does anyone have any hints for â€ś6: Complex for Elf Validatorâ€ť? At first I thought it might be an issue with prioritizing straight movements but Iâ€™ve made some additional test cases and my code seems to be prioritizing straight movements properly.

Itâ€™s difficult to give hints for this puzzle. If you want, you may send me your code in private message and Iâ€™ll take a look to see what hints may be given.