On Friday, May 18, 2018 at 1:00:49 AM UTC+1, Adik wrote:
>
> im trying to create a (start new game) button to refresh the game (clean 
> board).. attached is the code i have
> I have already created a reset button that closes the whole game window 
> but i just want it to wipe the previous game data and start new game.
>
> Thankyou in advance.
>





I have recently created a button that gets rid of the values in the game 
but it is not playable after that
this is the code i came up with:
(define startnewgamebut (new button%
                             [parent myFrame]
                             [label "Start New Game"]
                             [callback (λ (m j)
                                         (updateState 2 2 0)
                                         (updateState 2 1 0)
                                         (updateState 2 0 0)
                                         (updateState 1 2 0)
                                         (updateState 1 1 0)
                                         (updateState 1 0 0)
                                         (updateState 0 2 0)
                                         (updateState 0 1 0)
                                         (updateState 0 0 0)
                                         (update)

                                         
                                         )]))


any 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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to