Jul-04-2021, 12:44 PM
(This post was last modified: Jul-04-2021, 12:44 PM by BashBedlam.)
On line 171 you reset
dice
to a new iteration of Dice
each time the "roll dice' button is pressed. It might be best to do this only once, perhaps at the beginning of Gameloop
like this:def GameLoop(): dice = Dice() while not game_over:The problem that you're having is because
dice.SetTableDice ()
only updates the dice when "roll dice" is clicked. I recommend that you move it down with pygame.display.update ()
like this:clock.tick(30) dice.SetTableDice () pygame.display.update()