phone rings, pick it up ask the customer for: dice (five values: d1, d2, d3, d4, d5) and holding info (five booleans: b1, b2, b3, b4, b5) and roll information about whether to store or roll/advance what i want to store the combination as (entry) the entries stored thus far (table) if (customer brought nothing) { generate first roll roll = 1 message = "Welcome" } else { message = "Welcome back"; if you're calling to store your dice in an entry { store the combination somehow (change the table) // my table is like this: "ones=1,3,2,1,1&chance=6,3,5,5,6" generate first roll roll = 1 } else { if roll == 3 or you came here by pressing the store button { you list a number of options for me: ones, twos, sixes, large straight... } else { if b1 is not on { d1 = some random value } else { } if b2 is not on { d1 = some random value } else { } if b3 is not on { d1 = some random value } else { } if b4 is not on { d1 = some random value } else { } if b5 is not on { d1 = some random value } else { } roll += 1 } } } print the five dice, and message store the dice, message and roll as hidden fields in the form add five fields to indicate which dice to hold also provide two submit buttons (one for advance and one for store) the buttons will have different names