Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Swaroop Guggilam committed Jun 4, 2022
2 parents 86c6694 + b4c833c commit 1fe868d
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Improvement to size of Sudoku Mode buttons for Mobile Devices.
* Shortcuts to help button.
* Display and Design improvements.
* Arrow key movements to Hex Sudoku Mode.
* Bug fixes.
* 2022/04/30 ver 2.26.19
* Added more puzz link support - kropki, firefly, slant, spiral galaxies, ringring, doubleback, yinyang, hitori, putteria, hanare, aho, shikaku, fillmat, lookair, paintarea, sukoro, sukkororoom, usotatami, usoone, scrin, hebiichigo, tasquare, minesweeper, ichimaga, magneticichimaga, crossingichimaga, territory, doublechoco, tateboyokobo, canalview, chocobanana, tonttiraja, dotchiloop, chainedblock, oneroomonedoor, rassisilai
Expand Down
95 changes: 93 additions & 2 deletions docs/js/class_hex.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,95 @@ class Puzzle_hex extends Puzzle {
cursorpos = cursorpos - 3 * this.nx - 1;
}

if (this.mode[this.mode.qa].edit_mode === "number" || this.mode[this.mode.qa].edit_mode === "symbol") {
if (this.mode[this.mode.qa].edit_mode === "number" && this.mode[this.mode.qa][this.mode[this.mode.qa].edit_mode][0] === "3") {} else {
if (this.mode[this.mode.qa].edit_mode === "number" || this.mode[this.mode.qa].edit_mode === "symbol" || this.mode[this.mode.qa].edit_mode === "sudoku") {
if (this.mode[this.mode.qa].edit_mode === "number" && this.mode[this.mode.qa][this.mode[this.mode.qa].edit_mode][0] === "3") {

} else if (this.mode[this.mode.qa].edit_mode === "sudoku") {
if (this.selection.length >= 1) {
switch (c) {
case 0: // right to left for theta = 0
a = this.cursol - 1;
if (this.point[a].use === 1) { this.cursol = a; }
break;
case 1: // bottom right to top left for theta = 0
if ((this.nx % 2) === 0) {
if ((count % 2) === 0) {
a = this.cursol - (this.nx * 3 + 1);
} else {
a = this.cursol - (this.nx * 3 + 2);
}
} else {
if ((count % 2) === 0) {
a = this.cursol - (this.nx * 3 + 2);
} else {
a = this.cursol - (this.nx * 3 + 1);
}
}
if (this.point[a].use === 1) { this.cursol = a; }
break;
case 2: // left to right for theta = 0
a = this.cursol + 1;
if (this.point[a].use === 1) { this.cursol = a; }
break;
case 3: // top left to bottom right for theta = 0
if ((this.nx % 2) === 0) {
if ((count % 2) === 1) {
a = this.cursol + (this.nx * 3 + 1);
} else {
a = this.cursol + (this.nx * 3 + 2);
}
} else {
if ((count % 2) === 1) {
a = this.cursol + (this.nx * 3 + 2);
} else {
a = this.cursol + (this.nx * 3 + 1);
}
}
if (this.point[a].use === 1) { this.cursol = a; }
break;
case 4: // top right to bottom left for theta = 0
if ((this.nx % 2) === 0) {
if ((count % 2) === 1) {
a = this.cursol + (this.nx * 3);
} else {
a = this.cursol + (this.nx * 3 + 1);
}
} else {
if ((count % 2) === 1) {
a = this.cursol + (this.nx * 3 + 1);
} else {
a = this.cursol + (this.nx * 3);
}
}
if (this.point[a].use === 1) { this.cursol = a; }
break;
case 5: // bottom left to top right for theta = 0
if ((this.nx % 2) === 0) {
if ((count % 2) === 0) {
a = this.cursol - (this.nx * 3);
} else {
a = this.cursol - (this.nx * 3 + 1);
}
} else {
if ((count % 2) === 0) {
a = this.cursol - (this.nx * 3 + 1);
} else {
a = this.cursol - (this.nx * 3);
}
}
if (this.point[a].use === 1) { this.cursol = a; }
break;
}
if (this.point[a].use === 1) {
if (!ctrl_key) {
this.selection = [];
}
if (!this.selection.includes(a)) {
this.selection.push(a);
}
}
}
} else {
switch (c) {
case 0: // right to left for theta = 0
a = this.cursol - 1;
Expand Down Expand Up @@ -548,6 +635,10 @@ class Puzzle_hex extends Puzzle {
if (this.point[a].use === 1) { this.cursol = a; }
break;
}
this.selection = [];
if (!this.selection.includes(this.cursol)) {
this.selection.push(this.cursol);
}
}
}
this.redraw();
Expand Down

0 comments on commit 1fe868d

Please sign in to comment.