Content-Length: 293423 | pFad | http://github.com/ghostcode/JavaScript/commit/0e5cf5e843fd3509553f1f53e296bd21881f950d
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
KnightTour
1 parent 069803f commit 0e5cf5eCopy full SHA for 0e5cf5e
Backtracking/tests/KnightTour.test.js
@@ -11,7 +11,7 @@ describe('OpenKnightTour', () => {
11
[0, 0, 0, 0, 0]
12
])
13
14
- KT.solve()
+ expect(KT.solve()).toBe(true)
15
expect(KT.board).toEqual([
16
[19, 4, 15, 10, 25],
17
[14, 9, 18, 5, 16],
@@ -20,4 +20,18 @@ describe('OpenKnightTour', () => {
20
[21, 2, 7, 12, 23]
21
22
})
23
+
24
+ it('OpenKnightTour(2)', () => {
25
+ const KT = new OpenKnightTour(2)
26
+ expect(KT.board).toEqual([
27
+ [0, 0],
28
+ [0, 0]
29
+ ])
30
31
+ expect(KT.solve()).toBe(false)
32
33
34
35
36
+ })
37
Fetched URL: http://github.com/ghostcode/JavaScript/commit/0e5cf5e843fd3509553f1f53e296bd21881f950d
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy
0 commit comments