During our development of Settlers of Catan, we met a subfunction level problem of synchronizing a dice and read the dice result based on the face exposing up.
For example, given two dices in the following positions. You need to detect the facial values of the dices.
The number is printed in console.