Power Of Thor - Episode 1 - Puzzle discussion

Feel free to send your feedback or ask some help here!

13 Likes

The game has a bug. You cant get 100% score due to the second level`s name doesnt match with the real one.

UP != DOWN

8 Likes

It works on my side, are you sure you didn’t swap coordinates? I mean, origin is on the NW corner so going up towards north equals a decreasing y coordinate, not increasing.

2 Likes

This looks like it is fixed now. I get 100%

1 Like

with the following code i can run all test at once:

Edit:No full code allowed

but for some reason i only get 75%

When reading your code, the mistakes are actually quite obvious. You never go only S, but go SW when goal is towards NW and even go SW when goal is towards NE… Moreover, you’re rarely updating Thor position. I’m surprised you got 75% with that and even more that it passed all tests in IDE.

3 Likes

Hi,

You don’t even need all that test. You can make a diagonal move by compositing 1 vertical move, and 1 horizontal. For example the string “NE” is equal to “N”+“E”, so you can append east move to north move with just 2 tests. You don’t even need to test diagonals.

2 Likes

Hey here’s how I solved it with a Switch statement :slight_smile:
MODERATOR EDIT: no full code please

2 Likes

updated after some tome. nevermind.

elementary geometry, but i got it hard (100% done)

I have passed all the test cases but then when I submit I only get 75%

I think there is a bug

3 Likes

My strange scala solution
MODERATOR EDIT: no full code please

Me too, C#

MODERATOR EDIT: no full code please

I was inclined to try the solution provided by jeangodecoster. It’s clever. I re-did it with Python 3.

Anyway, I’ve tried using this on all tests. The code is unable to complete tests #3 and #4. As noted through trial, when Thor’s position and the Light’s position both share the same Y coordinate (on test #3), by this code he should continue to move West until he hits his mark. Mind you, that Y coordinate is mutually 17, and, thus, within the bounds of LY and TY.

Anyone have any ideas as to what might be happening here?

Best regards.

6 Likes

'Aha… Nevermind. Figured it out.
My stupid self was assuming that input for LX, LY, TX, TY would automatically update Thor’s coordinates. I assumed incorrectly.

MODERATOR EDIT: no full code please

10 Likes

Hi All,

I get a bug when running in C# the coordinate read from the input doesn’t change in the the 3rd test.
Did one get this? or can you tell me where can i report bugs ?

Thank you all,
Regards

2 Likes

I’ve got 100% with this python code:
** MODERATOR EDIT: no full code please **

Hi Guys! My code succeeded the step 1&2 but not the 3rd, it seems my code doesn’t acquire the new position of Thor, isn’t ?

Thanks for your help :slight_smile:

You need to update yourself the new position of Thor, indeed.

Also please don’t put full code here so that other users can guess by themselves :wink:

1 Like

I’m sorry, I wouldn’t have to post my entire code :slight_smile:
Thank you for answering, I was thinking that the position was automatically corrected;…