From af69696b185d739ac23248fa465109e9cc8fa79b Mon Sep 17 00:00:00 2001 From: 1grzyb1 Date: Thu, 4 Apr 2024 13:11:39 +0200 Subject: [PATCH] feat(sak): better check if foreigners --- .../kotlin/odyseja/odysejapka/timetable/Performance.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/odyseja/odysejapka/timetable/Performance.kt b/src/main/kotlin/odyseja/odysejapka/timetable/Performance.kt index 1c61af4..b20f7a0 100644 --- a/src/main/kotlin/odyseja/odysejapka/timetable/Performance.kt +++ b/src/main/kotlin/odyseja/odysejapka/timetable/Performance.kt @@ -23,6 +23,11 @@ data class Performance ( } fun isForeigner(): Boolean { - return city.lowercase() in listOf("spain", "china") + for (foreigner in listOf("spain", "china")) { + if (city.lowercase().contains(foreigner) || team.lowercase().contains(foreigner)) { + return true + } + } + return false } } \ No newline at end of file