2

I can't get the fltk window yourhand to show. Does the Fl.show() have to be outside the function? This is a part of my card game program.

def makecards(Fl_Return_Button):
    global c
    yourhand=Fl_Window(100,100,1300,145,'Your Cards')
    yourhand.begin()
    for x in range(NUM_CARDS):
        while True:
            cv = random.randint(2,14)#value
            cs = random.randint(0,3)#suit

            if (cv, cs) not in hand:
                break
        hand.append((cv, cs))
        c+=100
        b=Fl_Button(c,0,100,140)
        b.label(str(SUITS[cs][1]))
        order=Fl_Input(210,250,80,40)
        submit=Fl_Return_Button(210,300,80,40,'Submit')
        b.redraw()
    yourhand.end()
    yourhand.show()
cup
  • 7,589
  • 4
  • 19
  • 42
Ruochan Liu
  • 167
  • 6

0 Answers0