def draw(self, guesses):
        self.context.fillStyle = '#000'
        self.context.lineWidth = 2 
        if guesses == 1:
            self.context.fillRect(20, 280, 200,10)
        elif guesses == 2:
            self.context.fillRect(40, 20, 10, 260)
        elif guesses == 3:
            self.context.fillRect(20, 20, 160,10)
        elif guesses == 4:
            self.context.saveContext()
            self.context.translate(80,30)
            self.context.rotate(130 * math.pi / 180)
            self.context.fillRect(0,0, 50,10)
            self.context.restoreContext()
        elif guesses == 5:
            self.context.fillRect(140, 20, 10, 50)
        elif guesses == 6:
            self.context.beginPath()
            self.context.arc(145, 100, 30, 0, math.pi * 2, True)
            self.context.closePath()
            self.context.stroke()
        elif guesses == 7:
            self.context.fillRect(145, 130, 2, 80)
        elif guesses == 8:
            self.context.saveContext()
            self.context.translate(147,160)
            self.context.rotate(130 * math.pi / 180)
            self.context.fillRect(0,0, 50,2)
            self.context.restoreContext()
        elif guesses == 9:
            self.context.saveContext()
            self.context.translate(147,160)
            self.context.rotate(45 * math.pi / 180)
            self.context.fillRect(0,0, 50,2)
            self.context.restoreContext()
        elif guesses == 10:
            self.context.saveContext()
            self.context.translate(147,210)
            self.context.rotate(130 * math.pi / 180)
            self.context.fillRect(0,0, 60,2)
            self.context.restoreContext()
        elif guesses == 11:
            self.context.saveContext()
            self.context.translate(147,210)
            self.context.rotate(45 * math.pi / 180)
            self.context.fillRect(0,0, 60,2)
            self.context.restoreContext()
        self.context.restoreContext()
dataset/ETHPy150Open anandology/pyjamas/examples/hangman/HangManWidget.py/HangDude.draw/original