def __init__(self):
        Composite.__init__(self)
        self.guesses = 0
        self.score = 0
        self.level = 5
        self.answer = ''
        self.blanks = ''

        self.vp_main = VerticalPanel()
        self.vp_main.setSpacing(4)
        self.hangdude = HangDude()
        self.cmdNew = Button("Start", self)

        self.radLevel5 = RadioButton("group0", "5-10 letters")
        self.radLevel5.setChecked(True)
        self.radLevel10 = RadioButton("group0", "10-15 letters")
        self.radLevel15 = RadioButton("group0", "15-20 letters")
        self.radLevel20 = RadioButton("group0", "20+ letters")

        self.radLevel5.addClickListener(self.onRadioSelect)
        self.radLevel10.addClickListener(self.onRadioSelect) 
        self.radLevel15.addClickListener(self.onRadioSelect)
        self.radLevel20.addClickListener(self.onRadioSelect) 

        self.rad_hp = HorizontalPanel()
        self.rad_hp.setSpacing(4)
        self.rad_hp.add(self.radLevel5)
        self.rad_hp.add(self.radLevel10)
        self.rad_hp.add(self.radLevel15)
        self.rad_hp.add(self.radLevel20)
        self.rad_hp.add(self.cmdNew)

        self.puzzlestring = HTML()

        self.key_widgets = []
        for i in range (len(string.uppercase)):
            self.key_widgets.append(Button(string.uppercase[i:i+1], self))

        self.toprow = HorizontalPanel()
        self.midrow = HorizontalPanel()
        self.botrow = HorizontalPanel()

        for i in range(len(self.key_widgets)):
            if i <= 7:
                 self.toprow.add(self.key_widgets[i])
            elif i <= 16:
                 self.midrow.add(self.key_widgets[i])
            else:
                 self.botrow.add(self.key_widgets[i])
        
        self.vp_main.add(self.hangdude)
        self.vp_main.add(self.puzzlestring)
        self.vp_main.add(self.toprow)
        self.vp_main.add(self.midrow)
        self.vp_main.add(self.botrow)
        self.vp_main.add(self.rad_hp)

        for i in range(1,12):
            self.hangdude.draw(i)

        self.setWidget(self.vp_main)
dataset/ETHPy150Open anandology/pyjamas/examples/hangman/HangManWidget.py/HangManWidget.__init__/original