From 9dc01ba47fc99e2a115f2304153973f02c45c061 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 7 Oct 2023 20:47:10 +0200 Subject: use bingo api class --- .../java/at/hannibal2/skyhanni/data/BingoAPI.kt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/data/BingoAPI.kt (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BingoAPI.kt new file mode 100644 index 000000000..8eac5b720 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/BingoAPI.kt @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.data + +object BingoAPI { + + private var ranks = mapOf() + + init { + ranks = mapOf( + "§7Ⓑ" to 0, + "§aⒷ" to 1, + "§9Ⓑ" to 2, + "§5Ⓑ" to 3, + "§6Ⓑ" to 4, + ) + } + + fun getRank(text: String) = ranks.entries.find { text.contains(it.key) }?.value + + fun getIcon(searchRank: Int) = ranks.entries.find { it.value == searchRank }?.key + +} \ No newline at end of file -- cgit