Ad
  • Custom User Avatar

    yes ("work" as in "you can run it". But there are problems with the tests, yes)

  • Custom User Avatar
  • Custom User Avatar

    @monstaber, in that scenario all affected gems (that get shattered) are proc'd during the same move.

    Also note in the Description (with added emphasis):

    Rainbow Gems are a rare type of special Gem that destroy all Gems that match the color of the Gem it lands on

    If this doesn't answer your question, you'll need to provide a more clear description of your scenario.

  • Custom User Avatar

    "Since the only time this would matter is when the gem color affected by the Rainbow Gem and Crash Gem are the same, it doesn't make a difference. The Rainbow Gem would destroy all gems of the respective color, including the Crash gem."

    Isn't it still possible that this makes a difference? What if there are gems of the same color not directly linked to the spot of the crash gem -- then, if the crash gem destroys all the local same-colored gems first and the rainbow one subsequently falls to the floor, the unconnected same-colored gems would remain; but if the rainbow is processed first, they would be removed. Or am I missing something?

  • Custom User Avatar

    Thanks, approved :)

  • Custom User Avatar

    @Jomo: Click "Add New" and it's right there.

  • Custom User Avatar

    Make a comment with a link to it, please.

  • Custom User Avatar

    @gdbaldw, thanks for the edge case suggestions. I've added them to both Python and JavaScript translations. 👍

  • Custom User Avatar

    Thanks for bringing this up, @gdbaldw. The Description has been updated with the following note:

    > NOTE: In the case where both a Rainbow gem and a Crash gem land during the same move, the effects of the Rainbow gem occur before the Crash gem

    EDIT: Since the only time this would matter is when the gem color affected by the Rainbow Gem and Crash Gem are the same, it doesn't make a difference. The Rainbow Gem would destroy all gems of the respective color, including the Crash gem.

  • Custom User Avatar

    Hi gdbaldw,

    Did you get anywhere with this?

    One thing I noticed in terms of the pattern of digits in the two solutions was that they each have a "backward L" shape within at least one district. In the case of the first solution it's in District 2, and in the second solution the backward-L appears within both District 2 and 3 (and arguably 4). By "backward L" I mean that the digits in the district move downward, and then to the left.

    When I was solving this Kata, the downwards-then-move-to-the-left was one of the last things I had to code for (as I was getting None even when a valid solution was available). My solution takes a somewhat "brute force" approach in that it first generates every possibility for what each district combination may look like (5 valid districts according to the rules) and then compares the pattern provided in the input with each generated potential solution to see if we get a "hit" of winning 3 districts.

    I can't (for unknown reasons!) see beyond the 5th line of your solution so I can't see if your code covers this backward-L scenario fully (not sure I'd understand the code even if I could see it!).

    cheers, Phil

  • Custom User Avatar

    ok, thanks for the feedback. So I guess you ranked it 2 kyu or 1 (even if easier than the 2 others)?

    How does one solicit CW feedback on best practices, clever, or coding style?

    there are almost no such things, unfortunately. You can grab some info there:

    but best practices are often a matter of taste rather than anything, as long as there are no detailed contract set up. If you're talking about best practices for authoring katas, the wiki page is rather up to date, but you'll learn more by reading test suites of other katas that contain things of interest and by reading the comments about what generally goes wrong here and there, I guess.

  • Custom User Avatar

    Cool, glad you like them. :)

    What's your personnal estimation of the last one you did?

  • Custom User Avatar

    tho it doesn't work on all maps (same for your solutions). ;)

  • Custom User Avatar

    Actually, if I ever attempt to do the #3, it should be about getting a list of randomized nodes (from FMC1) and find out what the correct name of the molecule would be. But I guess I'll never have the patience to build such a thing... xo

    Glad you liked it and thx a lot for your help, reviewing the description!

  • Custom User Avatar

    hey! you did it! Congrats! :)

  • Loading more items...