-
-
Save Pasanpr/486a761164b8795433231ed20e992b7a to your computer and use it in GitHub Desktop.
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
class RaceManager: HorseRaceDelegate { | |
let race: Race | |
init(race: Race) { | |
self.race = race | |
race.delegate = self | |
race.start() | |
} | |
func race(_ race: Race, didStartAt time: Date) { | |
// some implementation | |
} | |
func addLapLeader(_ horse: Horse, forLap lap: Int, atTime time: Date) { | |
// some implementation | |
} | |
func race(_ race: Race, didEndAt time: Date, withWinner winner: Horse) { | |
// some implementation | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment