From 1fdee041c33cd47a7b0a5073ea6fd7de62b61858 Mon Sep 17 00:00:00 2001 From: klemek Date: Thu, 14 Oct 2021 17:41:52 +0200 Subject: [PATCH] precise mappings --- index.html | 6 +++--- main.js | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index d032e21..e1180c0 100644 --- a/index.html +++ b/index.html @@ -28,9 +28,9 @@
{{ v }}

Options

-
-
-
+
+
+

diff --git a/main.js b/main.js index 0da2197..fbb63d3 100644 --- a/main.js +++ b/main.js @@ -88,8 +88,11 @@ let app = { available: kanas.rows, selected: kanas.rows, rh: true, + hr: true, rk: false, + kr: false, hk: false, + kh: false, answers: 6, }, kanas: [], @@ -142,15 +145,12 @@ let app = { //TODO add difficulty const mappings = []; - if (self.options.rh) { - mappings.push([0, 1], [1, 0]); - } - if (self.options.rk) { - mappings.push([0, 2], [2, 0]); - } - if (self.options.hk) { - mappings.push([1, 2], [2, 1]); - } + if (self.options.rh) { mappings.push([0, 1]); } + if (self.options.hr) { mappings.push([1, 0]); } + if (self.options.rk) { mappings.push([0, 2]); } + if (self.options.kr) { mappings.push([2, 0]); } + if (self.options.hk) { mappings.push([1, 2]); } + if (self.options.kh) { mappings.push([2, 1]); } const mapping = utils.randitem(mappings); self.question = self.kanas[questionIndex][mapping[0]];