Hi guys, so I am working on rolling dice game in GUI, the game rules will 
be something like rolling 3 dices and then giving out points to 2 players 
based on the rolled values. 

Im now stuck on the showing value in GUI. Basically what I need is to show 
rolled value somewhere in frame. 

This is my rolling dice code:

(define (nrandom n)
    (if (= n 0 ) '() (cons (random 1 7) (nrandom (- n 1)))))

this is my callback function which i know is wrong:

(new button% [parent gamew]
             [label "roll dice"]
             [min-width 150]
             ; Callback procedure for a button click:
             [callback (lambda (b e) (send (nrandom 3) show #t))])

So by using this im getting my 3 values in IDE window. Where should I look 
for information how to get them in frame in some kind of box?

I just started my programming journey and racket documentation is not easy 
for me to get any information from there tbh. Just figuring out how to make 
frame and buttons + callback functions took me good few hours.

Thanks for help

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/da23d01b-5422-4fe9-b40d-0ca9a904fed9%40googlegroups.com.

Reply via email to