Elo implementation in Apple Swift. Port from sootn/Rusty-elo