Procházet zdrojové kódy

Disallow skipping the last line

Thomas Dy před 3 roky
rodič
revize
23291dea4f
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/game/typing.ts

+ 2 - 1
src/game/typing.ts

@@ -290,7 +290,8 @@ class TypingPlayingScreen implements Screen {
       const skippable =
         autoComplete &&
         lastLine !== undefined &&
-        lastLine.end! - lastLine.start! > 3;
+        lastLine.end! - lastLine.start! > 3 &&
+        this.currentIndex < this.lines.length - 1;
       this.setWaiting(true, skippable);
     } else {
       if (this.currentIndex >= this.lines.length) {