(And I know you can't actually mark off any of the squares, it was giving me an error code and I didn't feel like figuring that part out so I deleted it lol)
Code: Select all
default bingolist = list(range(1, 76))
default nextnumber = 0
default nextletter = " "
default cardbnumbers = ['0', '0', '0', '0', '0']
default cardinumbers = ['0', '0', '0', '0', '0']
default cardnnumbers = ['0', '0', '0', '0', '0']
default cardgnumbers = ['0', '0', '0', '0', '0']
default cardonumbers = ['0', '0', '0', '0', '0']
label bingocardrandom:
$ cardbnumbers = renpy.random.sample(range(1, 16), 5)
$ cardinumbers = renpy.random.sample(range(16, 31), 5)
$ cardnnumbers = renpy.random.sample(range(31, 46), 5)
$ cardgnumbers = renpy.random.sample(range(46, 61), 5)
$ cardonumbers = renpy.random.sample(range(61, 76), 5)
return
transform ballspin:
rotate 0
linear 3.0 rotate 1080
transform ballmove:
xpos 1000
ypos -100
ease 3.0 ypos 600
screen bingoball:
hbox:
button:
add "images/etc/bingoball[nextletter].png" at ballspin, ballmove
text "[nextnumber]"
action None
label get_number:
$ idx = renpy.random.randint(0, len(bingolist)-1)
$ nextnumber = bingolist.pop(idx)
return
screen bingo():
timer 5.0 action Call("bingocall")
grid 5 6:
xalign 0.25
yalign 0.7
spacing 20
text "B" xalign 0.5 yalign 0.5 size 80
text "I" xalign 0.5 yalign 0.5 size 80
text "N" xalign 0.5 yalign 0.5 size 80
text "G" xalign 0.5 yalign 0.5 size 80
text "O" xalign 0.5 yalign 0.5 size 80
## 1
textbutton "[cardbnumbers[0]]" xalign 0.5 yalign 0.5 text_size 60 ## 1
textbutton "[cardinumbers[0]]" xalign 0.5 yalign 0.5 text_size 60 ## 2
textbutton "[cardnnumbers[0]]" xalign 0.5 yalign 0.5 text_size 60 ## 3
textbutton "[cardgnumbers[0]]" xalign 0.5 yalign 0.5 text_size 60 ## 4
textbutton "[cardonumbers[0]]" xalign 0.5 yalign 0.5 text_size 60 ## 5
## 2
textbutton "[cardbnumbers[1]]" xalign 0.5 yalign 0.5 text_size 60 ## 6
textbutton "[cardinumbers[1]]" xalign 0.5 yalign 0.5 text_size 60 ## 7
textbutton "[cardnnumbers[1]]" xalign 0.5 yalign 0.5 text_size 60 ## 8
textbutton "[cardgnumbers[1]]" xalign 0.5 yalign 0.5 text_size 60 ## 9
textbutton "[cardonumbers[1]]" xalign 0.5 yalign 0.5 text_size 60 ## 10
## 3
textbutton "[cardbnumbers[2]]" xalign 0.5 yalign 0.5 text_size 60 ## 11
textbutton "[cardinumbers[2]]" xalign 0.5 yalign 0.5 text_size 60 ## 12
textbutton "FREE" xalign 0.5 yalign 0.5 text_size 60 ## 13
textbutton "[cardgnumbers[2]]" xalign 0.5 yalign 0.5 text_size 60 ## 14
textbutton "[cardonumbers[2]]" xalign 0.5 yalign 0.5 text_size 60 ## 15
## 4
textbutton "[cardbnumbers[3]]" xalign 0.5 yalign 0.5 text_size 60 ## 16
textbutton "[cardinumbers[3]]" xalign 0.5 yalign 0.5 text_size 60 ## 17
textbutton "[cardnnumbers[3]]" xalign 0.5 yalign 0.5 text_size 60 ## 18
textbutton "[cardgnumbers[3]]" xalign 0.5 yalign 0.5 text_size 60 ## 19
textbutton "[cardonumbers[3]]" xalign 0.5 yalign 0.5 text_size 60 ## 20
## 5
textbutton "[cardbnumbers[4]]" xalign 0.5 yalign 0.5 text_size 60 ## 21
textbutton "[cardinumbers[4]]" xalign 0.5 yalign 0.5 text_size 60 ## 22
textbutton "[cardnnumbers[4]]" xalign 0.5 yalign 0.5 text_size 60 ## 23
textbutton "[cardgnumbers[4]]" xalign 0.5 yalign 0.5 text_size 60 ## 24
textbutton "[cardonumbers[4]]" xalign 0.5 yalign 0.5 text_size 60 ## 25
default count = 0
default currentbingolist = 0
label start:
label bingostart:
call bingocardrandom
label bingoroll:
show screen bingo
label bingocall:
$ count +=1
call get_number
if 1 <= nextnumber <= 15:
$ nextletter = "b"
elif 16 <= nextnumber <= 30:
$ nextletter = "i"
elif 31 <= nextnumber <= 45:
$ nextletter = "n"
elif 46 <= nextnumber <= 60:
$ nextletter = "g"
elif 61 <= nextnumber <= 75:
$ nextletter = "o"
call screen bingoball
while count <= 75:
jump bingoroll
label bingostop:
return
return