Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
yes ("work" as in "you can run it". But there are problems with the tests, yes)
.
@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):
If this doesn't answer your question, you'll need to provide a more clear description of your scenario.
"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?
Thanks, approved :)
@Jomo: Click "Add New" and it's right there.
Make a comment with a link to it, please.
@gdbaldw
, thanks for the edge case suggestions. I've added them to both Python and JavaScript translations. 👍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 gemEDIT: 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.
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
ok, thanks for the feedback. So I guess you ranked it 2 kyu or 1 (even if easier than the 2 others)?
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.
Cool, glad you like them. :)
What's your personnal estimation of the last one you did?
tho it doesn't work on all maps (same for your solutions). ;)
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!
hey! you did it! Congrats! :)
Loading more items...