feat: integrate toastify-js and add solve guard with solved check
Some checks failed
Deploy to Production / deploy (push) Failing after 10s

This commit is contained in:
2026-02-23 23:53:47 +00:00
parent 349e74d7ef
commit c7d369c46a
5 changed files with 478 additions and 6 deletions

View File

@@ -97,6 +97,17 @@ export class DeepCube {
return true;
}
isSolved() {
// Check if permutations are identity and orientations are zero
for (let i = 0; i < 8; i++) {
if (this.cp[i] !== i || this.co[i] !== 0) return false;
}
for (let i = 0; i < 12; i++) {
if (this.ep[i] !== i || this.eo[i] !== 0) return false;
}
return true;
}
static fromCubies(cubies) {
const c2f = {
white: "U",