mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 00:06:16 +08:00
made sure restart count is counted for master and expert
This commit is contained in:
parent
e3a234e7e3
commit
a12a4b07a9
|
@ -254,6 +254,7 @@ function compareInput() {
|
|||
} else {
|
||||
if(config.difficulty == "master"){
|
||||
showResult(true);
|
||||
restartCount++;
|
||||
}
|
||||
if (currentWord[i] == undefined) {
|
||||
ret +=
|
||||
|
@ -534,7 +535,9 @@ function showResult(difficultyFailed = false) {
|
|||
restartCount: restartCount,
|
||||
difficulty: config.difficulty
|
||||
};
|
||||
restartCount = 0;
|
||||
if(config.difficulty == "normal" || ((config.difficulty == "master" || config.difficulty == "expert") && !difficultyFailed)){
|
||||
restartCount = 0;
|
||||
}
|
||||
if (stats.wpm > 0 && stats.wpm < 350 && stats.acc > 50 && stats.acc <= 100) {
|
||||
if (firebase.auth().currentUser != null) {
|
||||
db_getUserHighestWpm(config.mode, mode2, config.punctuation, config.language, config.difficulty).then(data => {
|
||||
|
@ -1281,6 +1284,7 @@ $(document).keydown((event) => {
|
|||
return;
|
||||
}else if(config.difficulty == "expert" || config.difficulty == "master"){
|
||||
showResult(true);
|
||||
restartCount++;
|
||||
return;
|
||||
}
|
||||
updateActiveElement();
|
||||
|
|
Loading…
Reference in a new issue