This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node { | |
constructor(state, node) { | |
if (arguments.length === 1) { | |
this.state = state; | |
this.parent; | |
this.childArray = []; | |
} else if (arguments.length === 2) { | |
this.state = new State(null, node.state); | |
if (node.parent !== (null || undefined)) { | |
this.parent = node.parent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node { | |
constructor(state, node) { | |
if (arguments.length === 1) { | |
this.state = state; | |
this.parent; | |
this.childArray = []; | |
} else if (arguments.length === 2) { | |
this.state = new State(null, node.state); | |
if (node.parent !== (null || undefined)) { | |
this.parent = node.parent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>n-queens solver</title> | |
</head> | |
<body> | |
<script type="src/queenWorker.js"></script> | |
<script> |