Someone asked for a dice game on steem, and I figured that may be a good training to get to know the apis better.
A beta version is done, I dare you to test it!
You probably know the drill: select a number between 0 and 100 and bet on a higher or lower result. Every block rolls a dice. The last 5 characters of the block hash the transaction is in gets converted to decimal, if it's >999,999 the next block is taken (and so on). The resulting integer x gives the result against which your number is checked: x%(10000)/100
The amount you get when you guessed right is sent * (100/(100-number OR 0+number)) minus the house edge, which is set to 1% for now. The limit for one game is a theoretical winning of 10 Steem, when your bet exceeds that it'll get returned on the spot.
I will create a frontend later. When you're brave enough, send a bit of Steem to the account steemdice1 with a memo formatted like this:
{"type":"higher","number":23.6}
or
{"type":"lower","number":75}
Don't gamble high amounts, I only filled the account with 100 STEEM for the tests. If something goes wrong I won't take any blame.
it was me :) for my idea i got 1USD and for implementing it you got 1k USD :)
not complaining but finding it funny :)
I read up on house advantages, and 2% seems to be pretty much. 1% sounds a lot more reasonable.
2% isn't terribly unreasonable, and 0.1% might be asking for trouble. I hope you have a low max profit payout set.
I had no idea of all this. Thanks to you and @smooth we're now set with a max profit of 10 and an edge of 1%. Let's see if we can hold this.
My latest post just showed off your incredible new front end!
Here it is! I am from 2 years in the future, here to show you what @pharesim ends up creating!
First non-interactive GUI version (no betting yet) is working!

Watch nothing happening live at http://pharesim.github.io/steemdice/
lol look at the current version! such an improvement!

https://pharesim.github.io/steemdice/
nice, needs to buy some liquid STEEM to test it out :)
I tried but cli_wallet isn't liking the fact that there are quotes in the memo field. Are they necessary?
Edit: oh yeah I can just do it on Steemit duh.
receive 2.000 STEEM from soupper0 Congratulations, you won! Your bet: higher 51; Result: 94.86Yes. You can use the GUI wallet here on steemit. When you like the cli_wallet better, use backslashes to escape the inner quotes:
"{\"type\":\"higher\",\"number\":50}"Nice.. lets do some betting!