pscreen.line(x - 2, y, x + 3, y - 2, (0, 0, 0), 1)
    #Mouth
    if randMood == "happy":
        pscreen.line(x - 5, y + 5, x + 5, y + 5, black)
        pscreen.line(x - 5, y + 5, x - 7, y + 3, black)
        pscreen.line(x + 5, y + 5, x + 7, y + 3, black)
    elif randMood == "nuetral":
        pscreen.line(x - 5, y + 5, x + 5, y + 5, black)
    elif randMood == "sad":
        pscreen.line(x - 5, y + 5, x + 5, y + 5, black)
        pscreen.line(x - 5, y + 5, x - 7, y + 8, black)
        pscreen.line(x + 5, y + 5, x + 7, y + 8, black)


#loading screen
pscreen.loadScreen()

#moods
m = ["happy", "sad", "nuetral"]

#loop
while True:
    #values
    randMood = m[random.randint(0, len(m) - 1)]
    x = random.randint(0, 799)  #random x cordinate
    y = random.randint(0, 799)  #random y cordinate
    randR = random.randint(5, 255)  #random Red value
    randG = random.randint(5, 255)  #random Green value
    randB = random.randint(5, 255)  #random Blue value
    c = (randR, randG, randB)  #random colors
    #pressing c prints circles on the screen
예제 #2
0
 def draw(self):
     pscreen.circle(self.x,self.y,self.radius,self.color,0)
     pscreen.circle(self.x-self.radius*0.35,self.y-self.radius*0.35,self.radius*0.2,(255,255,255),0)
     pscreen.loadScreen()