[Community Puzzle] ASCII cube

https://www.codingame.com/training/medium/ascii-cube

Send your feedback or ask for help here!

Created by @psychedelic68,validated by @dinobogan,@Snark and @pcourrousse.
If you have any issues, feel free to ping them.

This one is more interesting than what it looks like, if you want to handle all different cases without writing an obfuscated if forest it requires a bit of thinking.

Also, for some reason, the font is supposed to be monospace but in CG IDE (and some others), those braille chars are slightly wider, which makes the result looks pretty bad (see testcase 2 for example).

So my first impression was “do I really want to spend time on this puzzle for such an awfull result?”, but actually if you copy paste it in, say, a notepad, the result will look way better.

It’s not a cube but a parallelepiped. :man_student:

1 Like

And it is not ASCII, but Unicode, because of the Braille chars :slight_smile:
…But let’s face it: “ASCII cube” is a finer puzzle title than “Unicode parallelepiped”.

Parallelepiped is just a cube that was slapped in the face 3 times… :slight_smile:

1 Like

And unicode is not a good idea in a puzzle.

I’d prefer a pure ASCII one, like this:

   ____
  /`  /\
 /  `/  \
/___/`   \
\   \ `   \
 \   \ `   \
  \   \ `   \
   \   \ `   \
    \   \ `   \
     \   \ `...\
      \   \'   /
       \  '\  /
        \'__\/

I wrote a version 2 of it to produce pure ascii. Good for casual use anywhere.

image

Still a worthwhile puzzle to solve.

7 Likes

“Right rectangular prism” is better. A parallelepiped’s faces are parallelograms and need not be rectangles.

US high school textbooks usually use a shorter term: “box”.

Are you sure that all its angles are right angles? :wink:

I’m not able to see community solutions? Anyone facing the same problem?

Since the puzzle wants me to put hidden lines on top of visible edges, probably not. :slight_smile:

If you’re raising that question, though, then I wonder how you’re sure the faces are parallelograms!

If you haven’t solved the puzzle completely (100%) then that’s normal. Even then, you only get to see solutions in the same programming language(s) that you used in your solution(s). This prevents users from “solving by copy-paste”.

Note that passing all test cases is not “solving”. You do have to Submit your solution and have it pass all of the validators.

If that’s not the issue and you have submitted a 100% solution, then you might want to find the “Feedback & Bugs” category and ask in there.

1 Like

Because all of them are seen as parallelograms, their opposite edges are parallel.