From 411720765d7c1302eccd27bb524703ee896f1d88 Mon Sep 17 00:00:00 2001 From: Marvin Blum Date: Tue, 22 Dec 2020 20:27:17 +0100 Subject: [PATCH] Hightlight active row/column, show error when field cannot be selected. --- src/App.vue | 2 +- src/components/Matrix.vue | 62 +++++++++++++++++++++++++++++++++++---- src/components/Timer.vue | 16 ++++++++-- src/game/Game.ts | 7 +++-- src/sass/main.scss | 27 +++++++++++++++-- 5 files changed, 99 insertions(+), 15 deletions(-) diff --git a/src/App.vue b/src/App.vue index e7c3b6a..3c14508 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,7 +27,7 @@ matrix: [ "AA", "BB", "CC", "DD", "AA", "BB", - "CC", "DD", "AA", + "CC", "DD", "DD", ], sequences: [ ["AA", "CC", "DD"], diff --git a/src/components/Matrix.vue b/src/components/Matrix.vue index 823243c..f201c89 100644 --- a/src/components/Matrix.vue +++ b/src/components/Matrix.vue @@ -2,34 +2,84 @@

Code-Matrix

-
- {{matrix[(j - 1)*size + (i - 1)]}} +
+ {{game.getCell(j-1, i-1).value}}