# Shadows of the Knight - Episode 1 - Puzzle discussion

#43

And now, if you hardcoded, even if CG didn’t see it, the CGers will see it.

#44

Yeah, the last one’s a bitch. I was doing integer then swapped to floats. It seems like I’d just need one more hop to reach the bomb.

#45

I don’t understand how a building can be represented as a rectangular array of windows. Does the puzzle mean that each 3x3 sub-grid represents the UL, U, UR, R, … L windows? Does that mean that the rooms have 8 sides (hence 8 windows)? What about windows that are shared by multiple rooms? Are they represented by the same location in the rectangular array of windows? I wish the puzzle had explained a little more on how the windows are represented.

#46

I’m going to give you a hint: Think of the building wall as a graph with an x axis and a y axis. Adapt your binary search accordingly.

#47

guys can you help me?? does anyone have a javascript code for this game??

#48

I can assure you that giving you the solution won’t help you.
What about telling us what you don’t understand?

#49

Any help on how I can calculate the step ? I can’t figure it out

#50

English below.
Bonjour à tous, je viens de finir le code, tout fonctionne sauf “Pas là?” et je ne vois pas du tout ce qu’il faut faire, est-ce que quelqu’un peut m’éclairer s’il vous plaît ? Mon batman teste de nombreuses autres possibilités sans jamais rien trouver. Existe-t-il un complément d’information que je n’aurais pas lu pour le résoudre ?

Hi everyone, I was wondering what “Not there?” was about. I tried lots of codes, all my tests are good but not the last one and I don’t know how to resolve it. My Batman turns round and round but doesn’t find anything. Is there any kind of additional information I didn’t read ?

#51

This is a test case with many many windows, its purpose is to test the efficiency of your search. You can switch the view of the IDE viewer to “Adaptive” so that it zooms in, then you might be able to distinguish windows and see that there is a bomb, it’s just hard to find among so many possibilites.

#52

Got it. In Ruby f.e. we must use little trick

#53

My solution currently works for eall test cases except 03 and 07
I believe 03 may be bugged

The game says the bomb is at 37,38

My code outputs 37,38 over and over again until the turn limit runs out but batman does not move from the previous window.

any idea what may be the issue?

I am using PHP

#54

The bomb is actually at (38,38).
I advise you to put the replay player in debug mode (use the wheel at the bottom of it). So probably a bug in your code.

#55

On i see, its the red number which represents the bomb
this was confusing because batman was on the left of the bomb and the bombs co-ordinate appeared on the left of batman and batmans co-ordinate appeared on the right of the bomb

#56

I wrote a first version assuming the bombs didn’t move, and it worked right away for all tests. Why is it specified the bombs may move? Do the bombs really move? Why isn’t there any test that makes my code fail with moving bombs? I’m pretty sure my code fails if the bombs move unpredictably. Providing more information on how the bombs may move might be less confusing.

#57

the code i wrote works for every test except for evasive. i would just need 1 more turn to get it. im doing bisection method binary search. Batman starts at a Y of 98 and the goal is at Y = 0, calculating it it takes at least 8 turns using bisection. is there something im missing?
Thank You for any help

#58

Hey Guys,
I need some help with the last case (07 - Not there?).
What am I supposed to do there?
In every other case they give you a directions but in this one they don’t. example (U, UR, DL)
Thanks

#59

Problem could hide within not even numbers. Once Batman gets to Y=49 (in this particular test case) after one turn it is important to choose where to jump: Y=25 or Y=24 since 49/2 = 24.5
You really could take an extra jump in case of wrong choice

#60

I got the same difficulty. May be…
Use a Random to decide ceiling or floor? Submit it several times to get a good luck?

#61

don’t hesitate to look at the resources linked on the details page of the puzzle

#62

Is it possible to do the same thing for the community puzzles?