Understand the Link List Randomizer

Let us assume we have a high sophisticated machine: It knows a large list of strange but fascinating links and correspondending descriptions (such link lists need strange presenters) . For presenting three of those links our machine plays a strange game:

  1. At first it shuffles the whole list.
  2. Then it clears its result table and throws its three two-dimensional dice (0 on the one page, 1 on the other).
  3. If the first dice shows the number 1, the machine assigns the first entry of the list into the first row of its result table; if the second dice shows the number 1, the machine assigns the second entry of the list into the second row of the result table and - what a surprise - if the third dice shows the number 1, the machine assigns the third entry of the list into the third row of the result table.
  4. If all rows are filled, the game is over, the machine marks the final result and sends the table to the YAF4AJN-Page, which presents all three links and changes the background color.
  5. But if not all rows are filled, the machine firstly sends the now only partially filled result table to the YAF4AJN-Page for presenting the  partial result. Then the machine secondly starts the loop again (1) ... it shuffles the whole list ... (2) throws the dice ... and so on ... until all two-dimensional dice show the number 1.