File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 8
8
"""
9
9
10
10
import time
11
- import board
12
11
from random import randint
12
+ import board
13
13
from adafruit_clue import clue
14
14
from adafruit_debouncer import Debouncer
15
15
import displayio
16
16
from adafruit_bitmap_font import bitmap_font
17
- import terminalio
18
17
from adafruit_display_text import label
19
18
20
19
26
25
SELECTING = 0
27
26
ROLL_RESULT = 1
28
27
29
- number_of_dice = 0 # 0-relative, gets adjusted to 1-relative before display/use
28
+ # 0-relative, gets adjusted to 1-relative before display/use
29
+ number_of_dice = 0
30
30
side_selection = 0
31
31
32
32
button_a = Debouncer (lambda : clue .button_a )
57
57
58
58
def roll (count , sides ):
59
59
for i in range (15 ):
60
- roll = sum ([randint (1 , sides ) for d in range (count + 1 )])
61
- roll_label .text = str (roll )
60
+ roll_value = sum ([randint (1 , sides ) for d in range (count + 1 )])
61
+ roll_label .text = str (roll_value )
62
62
roll_label .x = 120 - (roll_label .bounding_box [2 ] // 2 )
63
63
duration = (i * 0.05 ) / 2
64
64
clue .play_tone (2000 , duration )
You can’t perform that action at this time.
0 commit comments