public static bool HasPlayerWon(GameField field, PlayerSide side) { var oppositeSide = side.ToOpposite(); return !field.AreAnyPieces(oppositeSide) || !AnyTurnsPossible(field, oppositeSide); }
public int Compare(CachedField oldField, CachedField newField, PlayerSide side) { var oppositeSide = side.ToOpposite(); return(oldField.PiecesCount(oppositeSide) - newField.PiecesCount(oppositeSide)); }