From 302455bac062080bf197b44e07ed53a3454be4c5 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Wed, 27 Nov 2024 17:19:46 +0200 Subject: Finishing almost the adventure --- src/scalevalapokalypsi/utils/utils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/scalevalapokalypsi/utils') diff --git a/src/scalevalapokalypsi/utils/utils.scala b/src/scalevalapokalypsi/utils/utils.scala index 4be0687..8179585 100644 --- a/src/scalevalapokalypsi/utils/utils.scala +++ b/src/scalevalapokalypsi/utils/utils.scala @@ -28,7 +28,7 @@ def byteArrayToString(bytes: Array[Byte]): Option[String] = /** Incredibly LÖRS string metric algorithm. * LÖRSiness explained by there being 6 hours left to the DL */ -def hammingDistance(s1: String, s2: String): Float = +def hammingDistance(s1: String, s2: String): Int = s1.zip(s2).map(p => p(0) != p(1)).filter((b: Boolean) => b).length /** Reads n characters from the given InputStream blockingly. -- cgit v1.2.3