From 0c5d1928b30f747d14ebbb10deb67356a36d0e20 Mon Sep 17 00:00:00 2001 From: Zach Graham Date: Wed, 16 Aug 2023 22:17:39 -0500 Subject: [PATCH] Fixes --- js/artsey-tutor.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/js/artsey-tutor.js b/js/artsey-tutor.js index 2d7105c..7b48c64 100644 --- a/js/artsey-tutor.js +++ b/js/artsey-tutor.js @@ -37,7 +37,9 @@ let mappings = { let lessons = [ "hello world", "artseyio is the best layout ever!", - "This is fun." + "this is fun.", + "i love this!", + "we can even type \"apostrophes\"" ]; async function artseyDraw() { @@ -107,17 +109,14 @@ async function setNextLetter() { await sleep(1000); if (++currentLessonIndex > lessons.length-1) currentLessonIndex = 0; - currentString = lessons[++currentLessonIndex]; + currentString = lessons[currentLessonIndex]; await setTypingText(currentString); currentLetterIndex = -1; await artseyReset(); await showKeyboard(); - // currentLetterIndex = -1; - // await artseyReset(); - // await setTypingText(lessons['2']); - // currentLetter = currentString.charAt(0); } let prevIndex = currentLetterIndex-1; + console.log("prevIndex: " + prevIndex + " currentLetterIndex: " + currentLessonIndex); if (prevIndex >= -1 || currentLetterIndex === 0) await unHighlightLetter(letterbox.children()[currentLetterIndex]); currentLetterIndex++;