Dice Simulation on a 3x3 LED Matrix

Well it is an un necessary waste of a pin.

Each dice pattern is a 9 bit pattern of zeros and ones. Therefore can be put in an int. an array of 6 of these ints define all possible patterns. Then all your code has to do is to read the bits in the int and light up the appropriate LEDs.
So you are left with one function that reads the bits in the int, you just pass to it the number you want to display. About ten lines tops.