Show the answer response on GUI
This commit is contained in:
parent
5e387a4cd3
commit
e9db9bc980
9
draw.py
9
draw.py
@ -164,7 +164,16 @@ def receiveDraw(sock,screen):
|
|||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
startFlag = True
|
startFlag = True
|
||||||
return False
|
return False
|
||||||
|
elif data == 'y':
|
||||||
|
pgStringVar = pygame.font.Font(None,80).render("CORRECT!!!",False,(255,0,0))# 文字物件
|
||||||
|
screen.blit(pgStringVar,(540,240))# draw font
|
||||||
|
pygame.display.update()
|
||||||
|
elif data == 'n':
|
||||||
|
pgStringVar = pygame.font.Font(None,80).render("WRONG!!!",False,(255,0,0))# 文字物件
|
||||||
|
screen.blit(pgStringVar,(100,450))# draw font
|
||||||
|
pygame.display.update()
|
||||||
#print(data)
|
#print(data)
|
||||||
|
else:
|
||||||
li = data.split('+') # 送來的座標可能一次有多個,規範以+隔開
|
li = data.split('+') # 送來的座標可能一次有多個,規範以+隔開
|
||||||
for i in li:
|
for i in li:
|
||||||
if i!="":
|
if i!="":
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user