Here some ideas to share with you. If you are going to create new DAC based on Bitshares Play, this info might be helpful to you to save your time.
I would like to design play in two abstract layers, the rule layer and the core layer, which will make it very easy to create a alt-play, for play family dac creator.
First, The rule layer is all about the game rule of the play, x of y, or serveral independ color balls with different total and k to select, similar the options in
https://bitsharestalk.org/index.php?topic=3818.0And the play family Dac creators can select whatever kind of rule they like, color counts, ball count, k to select, prize definition. The outer rule layer will also provide simple api for inheritors to customize prizes rules.
Meta data of this rule layer can be described as following json data, inherit DACs could customize it to create alt-play.
{
version: 1,
id: 1
name: "double-color ball lottory",
rule: {
balls: [
{N: 35, k: 5},
{N: 12, k: 2}
],
prizes: [
{level: 1, match: [[5, 2]]},
{level: 2, match: [[5, 1]]},
{level: 3, match: [[5, 0]]},
{level: 4, match: [[4, 2]]},
{level: 5, match: [[4, 1]]},
{level: 6, match: [[4, 0], [3, 2]]},
{level: 7, match: [[3, 1], [2, 2]]},
{leve;: 8, match: [[3, 0], [1, 2], [2, 1], [0, 2]]}
]
}
}
Second, the core layer is nothing but a true random number decentralized raffle process protected by mining, blockchain db etc.