commit 9acb2402dd48782325374464757652526b4211a1
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Mar 23 00:47:47 2020 +0000

    Implement computeHash()

diff --git a/src/main/java/org/distorted/scores/RubikScoresDownloader.java b/src/main/java/org/distorted/scores/RubikScoresDownloader.java
index 12e072ce..c5a8a627 100644
--- a/src/main/java/org/distorted/scores/RubikScoresDownloader.java
+++ b/src/main/java/org/distorted/scores/RubikScoresDownloader.java
@@ -103,7 +103,25 @@ public class RubikScoresDownloader implements Runnable
   private static int computeHash(String name, String veri, String country, String lvllist,
                                  String objlist, String timelist, int runnings)
     {
-    return 0;
+    int length, hash = 0;
+
+    length = name.length();
+    for(int i=0; i<length; i++) hash += i*name.charAt(i);
+    length = veri.length();
+    for(int i=0; i<length; i++) hash += i*veri.charAt(i);
+    length = country.length();
+    for(int i=0; i<length; i++) hash += i*country.charAt(i);
+    length = lvllist.length();
+    for(int i=0; i<length; i++) hash += i*lvllist.charAt(i);
+    length = objlist.length();
+    for(int i=0; i<length; i++) hash += i*objlist.charAt(i);
+    length = timelist.length();
+    for(int i=0; i<length; i++) hash += i*timelist.charAt(i);
+
+    hash *= runnings;
+    hash %= 541;
+
+    return hash<0 ? -hash: hash;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
