added (somewhat) functional front-end

This commit is contained in:
Valentijn van der Jagt
2025-12-29 23:06:07 +01:00
parent 1c2966b140
commit b619afe24f
4 changed files with 102 additions and 11 deletions

View File

@@ -42,6 +42,10 @@ public class BonusManager {
public static ArrayList<BonusItem> getBonusItems(String name){
ArrayList<Pair<BonusItem, Integer>> list = new ArrayList<>();
if (name == null || name.trim().isEmpty()){
return bonusItems;
}
for (BonusItem bonusItem : bonusItems) {
Integer score = fuzzyMatchScore(name, bonusItem.title);
list.add(Pair.pair(bonusItem, score));