[REBOL] Dice roller
From: al::bri::xtra::co::nz at: 4-Oct-2001 17:42
Christian wrote:
> Btw, I noticed you were working on a dice roller on the mailing list, I
actually wrote something if you're interested. I always write a dice-roller
as my first software for all language I learn. In fact, the reasons I'm
writing this class-object thing is to build a rpg software.
My Dice Roller is on my World Wide Reb site. At:
http://valley.150m.com/Rebol/Roll.r
It uses:
http://valley.150m.com/Rebol/Values/Dice.r
to provide various dice functions.
I'm not entirely happy with it yet, as it's got an absolute reference to my
web site in it which I don't like:
flash "Fetching background and script..."
Site: http://valley.150m.com/Rebol/
do load-thru join Site %Values/Dice.r
Background: load-thru/binary clean-path join Site %../Background.jpg
unview
random/seed now
view center-face layout [
backdrop Background
across
title "Dice"
N: rotary 50 "1" "2" "3" "4" "5" "6"
Die: rotary 50 "DF" "D2" "D3" "D4" "D6" "D8" "D10" "D12" "D20" "D30"
D50
"D100" "D1000"
Result: info "" 50
button "Roll" [
Result/text: try [do join "Roll " [N/Text " " Die/text]]
show Result
]
]
I'm interested in people's opinions on how to remove the Site value from the
code, and still work correctly both locally, and on the World Wide Reb.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/