Skip to content

Commit c1c8cfa

Browse files
mariohuqmariohuqErikSchierboom
authored
dominoes: Add test case with separate three-domino loops (#1939)
* Add test 'separate three-domino loops' in dominoes * Update exercises/dominoes/canonical-data.json Co-authored-by: Erik Schierboom <[email protected]> Co-authored-by: mariohuq <[email protected]> Co-authored-by: Erik Schierboom <[email protected]>
1 parent 285d2e6 commit c1c8cfa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

exercises/dominoes/canonical-data.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@
157157
"dominoes": [[1, 2], [5, 3], [3, 1], [1, 2], [2, 4], [1, 6], [2, 3], [3, 4], [5, 6]]
158158
},
159159
"expected": true
160+
},
161+
{
162+
"uuid": "44704c7c-3adb-4d98-bd30-f45527cf8b49",
163+
"description": "separate three-domino loops",
164+
"comments": [
165+
"Some solutions only check if each stone has at least two other neighbors, ",
166+
"but this test case should still fail due to the separate loops not being linked."
167+
],
168+
"property": "canChain",
169+
"input": {
170+
"dominoes": [[1, 2], [2, 3], [3, 1], [4, 5], [5, 6], [6, 4]]
171+
},
172+
"expected": false
160173
}
161174
]
162175
}

0 commit comments

Comments
 (0)