Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データ構造で色付きの立方体を表現する方法について誰かがアイデアを持っているかどうか疑問に思っていました. データ構造の各項目は、立方体の色の面を表す必要があります。この立方体は、x、y、z に沿って 3D で回転する必要があります。
ありがとうフランソワ
2つの要素の3つのタプルはどうですか?立方体の2つの反対側が見えないため、各タプルから1つの要素のみを選択します(または要素を選択しません)。
通常のダイの例:
((1, 6), (2, 5), (3, 4))