We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
0 commit comments