Add tests
This commit is contained in:
@@ -56,14 +56,16 @@ class TripletClue<C : ItemClass<C>>(val a: Item<C>, val b: Item<C>, val c: Item<
|
||||
val ib = grid.indexOf(bType)
|
||||
val ic = grid.indexOf(cType)
|
||||
|
||||
if (ib == 0 || ib == grid.size) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (ia == -1 && ic == -1) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (ia != -1 && ic != -1) {
|
||||
if (ia + 2 == ic || ia == ic + 2) {
|
||||
return true
|
||||
}
|
||||
return !(ia + 2 == ic || ia == ic + 2)
|
||||
}
|
||||
|
||||
if (isNeighbourRuleViolated(ia, ib) || isNeighbourRuleViolated(ib, ic)) {
|
||||
|
||||
Reference in New Issue
Block a user