# [Community Puzzle] Dice galaxy

https://www.codingame.com/training/medium/dice-galaxy

Created by @field3,validated by @bbb000bbbyyy,@Deltaspace and @Ellain.
If you have any issues, feel free to ping them.

My only issue is: how on earth could this have been approved? Have you even read the statement?!

I solved this as a reverse clash, and I disapprove of this style of writing for puzzles.

It appears Iâ€™m the sole codingamer to have solved it at time of writing. Did approvers not even bother to write up s olution of their own?

2 Likes

Iâ€™m also curious to know your feelings regarding the statement.
Can you share with me in PM your solutions to the puzzle? (As approvers, you should have a solution of your own)

(Iâ€™ll contact the approvers by email too)

I donâ€™t understand all the fuss about this puzzle. The statement is clear to me (not perfect sentences I give you that) and I actually find the problem at hand quite interesting.
By the way, I never approve a contribution until I build a working solution. And I can see that already 8 codingamers solved the puzzle.
I implemented a dedicated class to fold the 2D pattern into a 3D dice using advanced trigonometry.
About the contributionâ€™s comments section: I donâ€™t comment unless I have a question or a remark, for example when I spot an error with a test / validator.

1 Like

Just a small remark: As far as I know, this puzzle was supposed to be the second in a series (the third is still currently pending). The first one (â€śDice universeâ€ť or something like that) has not been accepted (most likely moved back to drafts by the author). The statement is much easier to understand with the first puzzle in mind.

Maybe the statement can be more clear, but it will be less interesting.
First, we already know that itâ€™s about the dice â€śâ€¦6 must be arranged according to the dice law.â€ť and what we supposed to do. That is we know that itâ€™s about the dice cube(6 sides of the cube) and we should arrange â€ś6â€ť. But we still have a question what â€śdice lawâ€ť means and with that line â€śWhen the net is made into a cube, â€ś6â€ť is placed on the opposite side of â€ś1â€ť.â€ť it became clear. In addition to it, we have an example that makes it clearer. Other lines just clarify implementation.

My solution: (UPD: 4 days have passed, so I erased it, cause it shouldnâ€™t be there).
(Gues my English not the best, sorry for it).

1 Like

If we put aside that this puzzleâ€™s description is the worst I saw on CG, the actual puzzle itself is quite nice and interestingâ€¦
To see it positively: besides a coding puzzle, we got another one for the price of one:
â€śReverse engineer what is the task from the IDE test cases!â€ť

Good puzzle but the description is atrocious, I hesitated to correct the text in the contribution tab, but actually I donâ€™t know if that works for published puzzles. And also itâ€™s probably better to ask about changing it first, so what do you think ?

Editing description after publishing should work. The only disadvantage I experienced earlier (not sure if it is still the case) that people, who already started to solve, will see their code disappear from ide, they have to get it back from the history tab (if they submitted at all already.)
Despite this, making a bad description better would benefit all, however it should be the primary responsibility and decision of the original author - especially if we are talking about a rewrite and not just correcting some small typos.

1 Like

Youâ€™re right, thanks for your answer. I sent a message to the author, weâ€™ll see.

nice puzzleâ€¦ i get it with around 300 lines of code by cutting all problems one by one, doing a real cubes patron analysis and feel like crying three or four times each time i found a new complexity. Is it fair to put it in a medium area ?
5 stars by the way and a to forget all this messâ€¦

1 Like

Did you hardcode all possible options ? Mine is about 30 lines.

The author never replied to my message btw.

@Djoums
yes, detecting each patron, using rotation, symetry horizontal, vertical and assign each patron to diagonals, knight move, or special cases to apply the dice lawâ€¦
i hope my solution should pass the next level puzzle.

I ve seen your solution, smart and brilliant as usualâ€¦

@Djoums not for trolling, but i test your solution.
In fact it applies a dice law without a cube, mine is really identifying the cube patrons. letâ€™s imagine universe with cubes and garbage like this example:
5
3
â€¦
1###.
â€¦##.

â€¦
1#6#.
â€¦##.

But it is not a cube ^^. Mine will do nothing with this shit

Sure, but handling bad input is not part of the problem If that was the case Iâ€™d probably add a filter function to analyze it before running the rest of the code.
That being said your solution works so itâ€™s good, and more importantly itâ€™s yours.

1 Like

Puzzle description is hilarious, I was tempted to edit â€śnetâ€ť into â€śtemplateâ€ť but I think it kills the fun.
I wouldnâ€™t be surprised if there was a japanese word that could mean both net or template, it would explain a lot.

Anyway the puzzle itself is pretty cool !

1 Like