diff --git a/src/main/scala/variant/Antichess.scala b/src/main/scala/variant/Antichess.scala index 9c6792e32..ad43d4acb 100644 --- a/src/main/scala/variant/Antichess.scala +++ b/src/main/scala/variant/Antichess.scala @@ -62,13 +62,7 @@ case object Antichess // We consider the case where a player has two knights if whiteKnights.size != 1 || blackKnights.size != 1 then false - else - { - for - whiteKnight <- whiteKnights.headOption - blackKnight <- blackKnights.headOption - yield whiteKnight.isLight == blackKnight.isLight - }.getOrElse(false) + else whiteKnights.forall(_.isLight) == blackKnights.forall(_.isLight) } // No player can win if the only remaining pieces are opposing bishops on different coloured