Wow, I thought I would never get it. The different colored dice really threw me off. Once I found out that they had nothing to do with it I figured it out quite quickly.
To the person that said "hide your javascript": Of course you will be able to cheat, and the fact that you couldn't figure it out without cheating says somthing about your intelligence