Last active
August 5, 2022 12:36
-
-
Save cekici/3f9b9d6fa80b1b16221e to your computer and use it in GitHub Desktop.
Yüksel'in buluşma algoritması
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getYukselsResponse(statics, bulusmaAyarlayan, bulusmaYeri, event, cokIsrar) { | |
return isBulusmayiAyarlayanYuksel(statics, bulusmayiAyarlayan) || | |
isBulusmaYeriYukseleUyuyor(statics, bulusmaYeri) || | |
isEventYukseleUyuyor(statics, event) || | |
cokIsrar; | |
} | |
function isBulusmayiAyarlayanYuksel(statics, bulusmayiAyarlayan) { | |
return bulusmayiAyarlayan === statics.people.YUKSEL; | |
} | |
function isBulusmaYeriYukseleUyuyor(statics, bulusmaYeri) { | |
return bulusmaYeri === statics.places.HISARUSTU || bulusmaYeri === statics.places.USKUDAR || | |
bulusmaYeri === statics.places.MASLAK || bulusmaYeri === statics.places.LEVENT; | |
} | |
function isEventYukseleUyuyor(statics, event) { | |
return event === statics.events.BASKETBOL_MACI || event === statics.events.SAPSAPA_BULUSMA; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment