Sunday, October 12, 2008

Roll Analysis

I've completed the code (it was oh so simple) for roll analysis and event determination. I decided that each of the betting possibilities would be represented by a constant, and I would use the roll outcome to create an array of valid events. For example, if a 4, 4, 6 were rolled, several event outcomes would be generated including an outcome for each of the die values:
  • DICEEVENT_4
  • DICEEVENT_4
  • DICEEVENT_6
  • DICEEVENT_SPECDOUB4AND6
  • DICEEVENT_BIG
  • DICEEVENT_SUM14
You get the idea. This simple way of representing outcomes allows a basic engine in under half-an-hour, and yet allows the determination of other possible events not represented on the initial board I have in mind like the ODD/EVEN outcomes.

No comments: