Skip to content
Snippets Groups Projects
Commit ea45e2b3 authored by Silas Dohm's avatar Silas Dohm
Browse files

added basic navigation (w, and b)

parent 93cc7f33
Branches
No related tags found
No related merge requests found
......@@ -34,7 +34,6 @@ class Word {
constructor(clue, word, x, y, direction) {
this.chars = new Array();
this.direction = direction;
// this.highlightColor = direction ? '#c8b9fc' : '#CFE9F5';
this.highlightColor = direction ? '#fff5bc' : '#ffddbd';
if (!mycell[x][y].hintNr) {
mycell[x][y].hintNr = ++Word.number;
......@@ -238,6 +237,14 @@ function logKey(e) {
case "r":
activeMode = mode.replace;
break;
case "B":
case "b":
activeCell = activeCell.word[m_orientation].chars[0].neighbour[m_orientation?1:0].word[m_orientation].chars[0];
break;
case "W":
case "w":
activeCell = activeCell.word[m_orientation].chars[activeCell.word[m_orientation].chars.length-1].neighbour[m_orientation?3:2];
break;
case "`":
activeCell.currentChar = activeCell.actualChar;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment