diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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) |
