Skip to content

Commit 3809a62

Browse files
fix(steam-bell-92#1486): register Number Sliding Puzzle in project loader
1 parent 75ecfe9 commit 3809a62

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

web-app/js/projects.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ function toPascalCase(str) {
5151
}
5252

5353
function initializeProject(projectName) {
54+
if (projectName === "number-sliding-puzzle") {
55+
initNumberSlidingPuzzle();
56+
return;
57+
}
58+
5459
const fnName = "init" + toPascalCase(projectName);
5560
const init = window[fnName];
5661

@@ -61,6 +66,10 @@ function initializeProject(projectName) {
6166

6267

6368
function getProjectHTML(projectName) {
69+
if (projectName === "number-sliding-puzzle") {
70+
return getNumberSlidingPuzzleHTML();
71+
}
72+
6473
const fnName = "get" + toPascalCase(projectName) + "HTML";
6574

6675
try {
@@ -628,4 +637,4 @@ function initNQueens() {
628637
output.innerHTML = "";
629638
solutionCountEl.textContent = "0";
630639
});
631-
}
640+
}

0 commit comments

Comments
 (0)