From f4a3535186e87b555f13df355ec9e234991021d0 Mon Sep 17 00:00:00 2001 From: Joachim Date: Fri, 24 Aug 2018 21:15:55 +0200 Subject: [PATCH] More cleanup. --- src/main/kotlin/be/nielandt/Move.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/kotlin/be/nielandt/Move.kt b/src/main/kotlin/be/nielandt/Move.kt index 40001a0..2bd7425 100644 --- a/src/main/kotlin/be/nielandt/Move.kt +++ b/src/main/kotlin/be/nielandt/Move.kt @@ -49,4 +49,11 @@ enum class Move { return this.toString().substring(0, 1) != otherMove.toString().substring(0, 1) } + /** + * Are both moves on the same face? Would be true for F2 and F_, for example. + */ + infix fun sameFace(otherMove: Move): Boolean { + return !otherFace(otherMove) + } + } \ No newline at end of file