Skip to content

Commit 9cfdf4f

Browse files
deem taking the outer path to the goal as the correct solution (#1)
* delete "the arrow must be point down" from goal condition * fix the misalignment in the maze drawing --------- Co-authored-by: kotaro-caffeinism <[email protected]>
1 parent 5db07d8 commit 9cfdf4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/script.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ window.onload = () => {
131131
}
132132

133133
const checkPosition = (index) => {
134-
if (JSON.stringify(movingArrow.index) === JSON.stringify([550, 850]) && movingArrow.pointing === "down" && index === movements.length - 1) {
134+
if (JSON.stringify(movingArrow.index) === JSON.stringify([550, 850]) && index === movements.length - 1) {
135135
document.body.classList.add("winner");
136136
executeCommands.setAttribute("disabled", "disabled");
137137
pattern.innerText = "Well done!";
@@ -211,7 +211,7 @@ window.onload = () => {
211211

212212
// bottom (exit from 500 to 600)
213213
ctx.lineTo(500, element.height - 100);
214-
canvasCoords.done === false ? addCanvasCoords([100, element.height - 100], [500, element.height - 100]) : "";
214+
canvasCoords.done === false ? addCanvasCoords([200, element.height - 100], [500, element.height - 100]) : "";
215215
ctx.moveTo(600, element.height - 100);
216216
ctx.lineTo(900, element.height - 100);
217217
canvasCoords.done === false ? addCanvasCoords([600, element.height - 100], [900, element.height - 100]) : "";

0 commit comments

Comments
 (0)