aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-07 20:47:10 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-07 20:47:10 +0200
commit9dc01ba47fc99e2a115f2304153973f02c45c061 (patch)
treefc5d24fdcb335cfd5f02ae211739dfcb20a2e87b /src/main/java/at/hannibal2/skyhanni/data
parent0d8fb26e0c79722b6b2235cce351aeb65aa3ee15 (diff)
downloadskyhanni-9dc01ba47fc99e2a115f2304153973f02c45c061.tar.gz
skyhanni-9dc01ba47fc99e2a115f2304153973f02c45c061.tar.bz2
skyhanni-9dc01ba47fc99e2a115f2304153973f02c45c061.zip
use bingo api class
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/BingoAPI.kt21
1 files changed, 21 insertions, 0 deletions
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<String, Int>()
+
+ 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