aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoop <Joop Kiefte>2022-04-02 14:50:28 +0100
committerjoop <Joop Kiefte>2022-04-02 14:50:28 +0100
commit147a632211be839d32771bccacab22881d589d92 (patch)
tree03b440523cf40a77ea74f96e3a67b6e6c8be4553
parent9abdd93136a937cda0c650a7af22acfdb4c416a5 (diff)
Typo + small adjustment
-rw-r--r--main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.go b/main.go
index 2482442..25c0f9d 100644
--- a/main.go
+++ b/main.go
@@ -160,7 +160,7 @@ func ReadCodeList() error {
CodeList[prayerID] = line[0]
}
}
- fmt.Println("Number of prayer codes:", len(CodeList))
+ fmt.Println("Number of prayers done:", len(CodeList))
return nil
}
@@ -291,6 +291,10 @@ func NewPrayerLengthSort(p []Prayer, r Prayer) PrayerLengthSort {
if diff < 0 {
diff = -diff
}
+ // Add a penalty if the author is not the same
+ if prayer.AuthorId != r.AuthorId {
+ diff += 100
+ }
out = append(out, struct {
P Prayer
Diff int
@@ -319,7 +323,7 @@ func main() {
PrayersWithCode[PrayerCode{code, Languages[prayer.LanguageId].Iso}] = prayer
}
}
- fmt.Println("Number of prayers with code: " + strconv.Itoa(len(PrayersWithCode)))
+ fmt.Println("Number of prayers with code loaded: " + strconv.Itoa(len(PrayersWithCode)))
// Ask which language to complete
languages := AskLanguages("Which languages do you want to complete? ")
prayers = ReadPrayers(languages, false)