Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Crux of the Desert - adventurer feedback


Looks like there are several problems in the code comments.

Defend against the waves by checking which direction the ogres are coming.

I believe the statement above is a missing a “from”, e.g.:

Defend against the waves by checking which direction the ogres are coming from.
Defend against the waves by checking from which direction the ogres are coming.

Check if the enemy is to the right of the hero:

The comment above seems superfluous/confusing.

If an enemy is above and to the left, build a fire-trap accordingly.

The comment above appears twice in the starting code.


Just a quick heads up: to make your code is easy to read” doesn’t make sense. Replacing “your code” with “it”, is an easy way to clearly see that there is no issue with the original sentence.

“to make your code easy to read” >>> “to make it easy to read”



Patch submitted.

I think the code would be easier to read and write if if-statements were nested instead of combined with and, and the buildXY("fire-trap", 40 - 20, 34 + 17) doesn’t make more sense than simply buildXY("fire-trap", 20, 53) would. Other than that, I like the level.


Oh damn, I’ve read that statement a dozen times and my brain was always reading “make” as “make sure”, like:

Store the results of comparisons as variables to make sure your code is easy to read.

Only now that I’ve read your comment, I have realized that there was never a “sure” word in there. :sweat_smile:
Needless to say, I should avoid posting feedback when I’m almost falling asleep.
I’ve removed the erroneous suggestion, thanks! :smile_cat:


I accepted Gundericus’ patch and fixed the duplicate comment.

I can’t think of a more concise way of saying: “Create a variable which stores the boolean result of the comparison between the player’s position and the enemy’s position.”

The intended solution doesn’t involve not.


Hm, at first glance when I have read “Check if the enemy is to the right of the hero”, I immediately thought about putting an if statement there. Only later on I’ve noticed it actually meant to store the computation in a variable. It seemed confusing to me at first, but I guess you can deduce the proper meaning from the context.