Binary Deployment broken?

Looks like I’ve found some bugs. I’d like confirmation.

1. The wrong answer hints are incorrect

I tried resubmitting for a new random seed, yet it is always like that – saying that the answers should either be either all zeros or all ones which surely are not correct.

2. The level seems unbeatable

Even with the correct answers, it doesn’t give success and the paladins do not say anything.

Really? Mine seems to work fine:

Though I checked the level editor, and getBinary and getTrinary don’t seem to work right…

@trotod thanks for the quick reply. I’m wondering why my level gives “run out of time”. What happens if you don’t fill in the lines for the warlocks?

It says that you pass (the first goal).

Then again, I remember I had one submission that failed for some reason, but submitting it again worked, so wondering what’s causing the problem.

Though your screenshot has nine minions per row. It should only be 8.

Oh damn, I’m stupid! That was the problem, it is passing now. :smile: Thanks.

So scratch the “unbeatable” part, I was just plainly dumb and couldn’t count the padding correctly hahah.

So there’s just a small bug with the wrong answer hints then.

The wrong answer hints also showed all 1s for me most of the time.

Other things:


2 was correct?

My code sometimes summons an extra troop for the ternary rows but it still passes.
Edit: I think the extra troop is because I repeated the same thing that checks if extra zeros are needed from the base 2 code (doesn’t take into account thirds?).
6427 should be 22211001

There shouldn’t be a leaderboard for time if the level ends at the same time for everyone.

The guide could be improved.

2 in binary is 10.
You can easily convert binary to decimal in the JavaScript console:

// parseInt(binary, 2) === decimal
parseInt(10, 2) === 2;
parseInt(1, 2) === 1;

The second parameter to parseInt is the base, so you can use this for trinaries as well as any other base.

I accepted trotod’s patch to fix the answer hints now.

Thanks for the feedback guys. Glad you are enjoying the level. And trotod, thanks for fixing my getBinary and getTrinary.

Although I did get both rewards, I went back and improved my code.

It turns out the mistake for 2 was due to using < instead of <= when checking for the highest power that was smaller or equal to the decimal. Perhaps one of the paladins should always say a random power of 2 to catch these edge cases.

I also fixed the thing that made an extra soldier go at the start of the ternary lines. The extra soldier didn’t affect the goal though.

The answer hints seemed to work this time so kudos to trotod.

Nice! Thanks @trotod.

Unfortunately, it doesn’t look like the patch fixed all of it. My answers aren’t correct, in any case, but, then, neither are the paladins’.

Try running the below in the JavaScript console:

parseInt('01001100', 2)
//=> 76
parseInt('01100000', 2)
//=> 96

They look right to me. :wink: (Seems like your '0' padding is off.)

(Also something weird happened with the Discourse CDN, at least for me I can’t see any image without changing the path.)

1 Like