Reply
Thread Tools
Posts: 32 | Thanked: 12 times | Joined on Feb 2010 @ Finland
#1
Hello! Im arranging weekly 8-ball tournaments at local pool hall and it would be great if i could raffle the players to chart with my N900 rather than using a card deck. For example if we have 13 players at the tournament i could get numbers 1-13 in random order. any ideas? thanks!
 
cashclientel's Avatar
Posts: 663 | Thanked: 282 times | Joined on Nov 2009 @ London, UK
#2
Let ME Google THAT for YOU : http://www.random.org/
__________________
Nokia are a business and have chosen a path of using the OSS community phenomenon to reduce their overheads specifically after sales support and development. Unlike Apple who do the opposite and make a killing from their Applications store.
 
Posts: 32 | Thanked: 12 times | Joined on Feb 2010 @ Finland
#3
Great link! Thank you! The random sequence generator i foud there serves my purpose perfectly! But how can one generate random numbers with N900 without internet connection? Is there such script or app?
 
pH5's Avatar
Posts: 138 | Thanked: 375 times | Joined on Aug 2009 @ Berlin
#4
python installed? try this python script:
Code:
import random, time
random.seed (time.time())
players = range(1,14)
random.shuffle(players)
print players
 

The Following User Says Thank You to pH5 For This Useful Post:
giannoug's Avatar
Posts: 334 | Thanked: 171 times | Joined on Dec 2009
#5
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#6
In a pinch,

Code:
perl -le 'print for (sort {rand() < 0.5} (1..13));'
in a terminal should do.
 
Posts: 32 | Thanked: 12 times | Joined on Feb 2010 @ Finland
#7
Originally Posted by lma View Post
In a pinch,

Code:
perl -le 'print for (sort {rand() < 0.5} (1..13));'
in a terminal should do.
Works like a charm! thank you!
 
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#8
Originally Posted by lma View Post
In a pinch,

Code:
perl -le 'print for (sort {rand() < 0.5} (1..13));'
in a terminal should do.
Ciao, see also Queen BeeCon Widget - Naive Dice Roller in instanceCmd parameter of exported beecon for perl-less solution...
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:13.