Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do i achieve this? Reply To: How do i achieve this?

#235620
maiki
Participant

@AlenAbdula hello, thanks for your reply and sorry for not being descriptive.
First of all, have you check http://www.btcroll.com ? Thats what i want to do, basically:
There’s a pool, Player1 adds lets say $3 bitcoin, Player2 will add $2 bitcoin and Player3 adds 5$ to the pool. The total prizepool is $10 bitcoin. When there are 3 deposits in the pool (aka 3players deposited money into the pool) the round will end and a winner will be choosen.
Each player will be assigned a range of number (100numbers/$1), let say you’re the first player that deposits and you deposit $1, you will get the numbers from 0-100, 2nd players deposits $3, he will get numbers 101-400 and player3 deposits $2 and he’ll get the numbers 401 to 600. The whole range of numbers is from 0 to 600, i will do a random() function from 0 to 600, let say the number generated by the random() function is 53, Player1 owns the numbers from 0 to 100, 53 is part of them so Player1 is the winner.

I have no single idea how would i go about managing my database, and manage the game engine, what i mean is, i dont really know how to find out when the round starts/ends and how to implement the 30 second timer when there are 2 or more players in the pool.

If you still dont understand what i mean, take a look at btcroll.com , its basically the same idea with small modifications which ill make.