Crazy RouletteThe Crazy Roulette [Fun version] is very simple,the registrations for each round close every friday of each week.Everyone can join in the fun version with the price of each ticket being 0.10 btc each, dont send more or less than that or your registration will not be accepted.At saturday of each week, the winner will be announced and i will post here each weeks winner and his earnings and also a proof of payment which you will be able to see with blockexplorer.
you can buy multiple tickets since this a roulette it will increase your opportunity of winning the max prize.So how does it work?
After the registrations are closed, every address has a number which is the number that corresponds to the order they bought the tickets.The roulette which is random and set with a number of spins defined by me in the fun version will add numbers to an array randomly, the person with the biggest number each week is the winner.
New version will appear if there is interest ...
To make it fair i will keep a
2% value of
total max prize every week, so that i feel that is my work is appreciated and to create new games ...
[Fun version]Number of spins = 10
ticket price = 0.10 btc
[Serious version]Number of spins = 2500
ticket price = 0.25 btc
Dont send more or less the the ticket price or you will not be accepted.Thanks
Actual Prize:Fun Version:0 btcSerious Version:0 btcUpdated everyday ...
Steps1. Send 0.10 btcs to:
157Gzuh97vviDNCQnLNTe2jGawdDK8HcoA
For fun version ...
1CXARkxE4p2kp75duhRCjtHzi89Gm44hJ3
For serious version ...
watch:
http://blockexplorer.com/address/157Gzuh97vviDNCQnLNTe2jGawdDK8HcoAwatch:
http://blockexplorer.com/address/1CXARkxE4p2kp75duhRCjtHzi89Gm44hJ32. Wait until Saturday of the winners announcement.
source code:
#Dont modify/distribute without the author permission.
def addr_array(total):
addresses = [0 for i in range(total)]
return addresses;
def random_number(total_spins,addresses):
i = 0;
j = 0;
while(j<total_spins):
while(i<total):
random_pos = randint(0,total-1);
addresses[random_pos] +=1;
i = i + 1;
j = j + 1;
return addresses;
def check_winner(max,address,total):
count = 0;
for i in range(total):
if(address[i] == max):
print("%d - Address %d with max value of %d ...\n" % (count,i,max));
count +=1;
return count;
def get_winner(total,address):
max = 0;
pos = 0;
i = 0;
winners = [];
count = 0;
while(i<total):
if(address[i]>max):
max = address[i];
pos = i;
i=i+1;
count = check_winner(max,address,total)
if(count <2):
print("The winner is %d with max %d \n" % (pos,max));
else:
for num in range(total):
if(address[num] == max):
winners.append(num);
print("The winner is %d with max %d after a close fight with %d more addresses \n" % (winners[randint(0,count-1)],max,count));
get_winner(total,random_number(total_spins,addr_array(total)));
Any question just tell me ...
Thanks !!!