mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
add Pattern#xor
This commit is contained in:
+4
@@ -21,6 +21,10 @@ public interface Pattern {
|
|||||||
return (y, column) -> this.matches(y, column) || that.matches(y, column);
|
return (y, column) -> this.matches(y, column) || that.matches(y, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default Pattern xor(Pattern that) {
|
||||||
|
return (y, column) -> this.matches(y, column) ^ that.matches(y, column);
|
||||||
|
}
|
||||||
|
|
||||||
default Pattern not() {
|
default Pattern not() {
|
||||||
return (y, column) -> !this.matches(y, column);
|
return (y, column) -> !this.matches(y, column);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user