File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 5454
5555## 运行
5656下载zip包,执行双击 typewords.exe
57+
58+ 运行后,可点击左上角图标,在下拉菜单中选“属性”,设置字体Font,方便孩子看得更清楚。
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class TypeWords:
99 sheetnames = {}
1010
1111 def __init__ (self ):
12- self .count = 0
12+ self .points = 0
1313 self .dicts = {}
1414 # get words
1515 self .words = excel .ReadExcel ('words.xlsx' )
@@ -39,7 +39,7 @@ def choose_types(self):
3939 self .dicts = self .words .read_data (self .params ["type" ])
4040
4141 def help_print (self ):
42- print ("打字练习,小学英语单词版. 输入[\exit]结束练习. " )
42+ print ("打字练习,小学英语单词版. 输入[\exit]结束练习. 负分将结束. " )
4343 print ("Author: Andy zhou<ablozhou@gmail.com> 2021" )
4444 print ("命令列表:" )
4545 print ("-" * 10 )
@@ -73,13 +73,14 @@ def practise(self):
7373 continue
7474
7575 if ans == word :
76- self .count += leng
77- print ("---%d---\n %s\n " % (self .count , self .dicts [ans ]))
76+ self .points += leng
77+ print ("---%d---\n %s\n " % (self .points , self .dicts [ans ]))
7878 else :
79- self .count -= leng
80- print ("Try again... %d\n " % self .count )
81- if self .count < 0 :
82- print ("Your have not enough points, game over!!!" )
79+ self .points -= leng
80+ print ("Try again... %d\n " % self .points )
81+ if self .points <= 0 :
82+ print ("GAME OVER!!! Your have not enough points!" )
83+ input ("Type any key to exit..." )
8384 break
8485
8586
You can’t perform that action at this time.
0 commit comments