Skip to content
This repository was archived by the owner on Mar 26, 2019. It is now read-only.

Commit 3176bf2

Browse files
committed
完成打词率属性
1 parent 0cbfdd9 commit 3176bf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/me/ryan/controller/TextController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ private void updateText() {
136136
int count = inputLengthNow - inputLengthLast;
137137
scoreUpdater.addToCharactersCount(count);
138138
// 如果字符数添加了不止一个,还要更新打词字符数
139-
139+
if (count > 1) {
140+
scoreUpdater.addToCharCountInWord(count);
141+
}
140142

141143
// 2. 检测刚刚键入的字符是否敲对了
142144
for (int i = inputLengthLast; i < inputLengthNow; i++) {

0 commit comments

Comments
 (0)