Created
June 17, 2020 19:36
-
-
Save sasssass/7f009c3903340b7f664b59a31159240a 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 Screen { | |
var musicPlayer : MusicPlayer? = null | |
var speaker : Speaker? = null | |
fun showSongName(name : String){ | |
print("show {$name}") | |
} | |
fun playSong(songName : String){ | |
musicPlayer?.playSong(songName) | |
} | |
fun turnOffMusicPlayer(){ | |
musicPlayer?.off() | |
} | |
fun turnOnMusicPlayer(){ | |
musicPlayer?.on() | |
} | |
fun turnOffSpeaker(){ | |
speaker?.off() | |
} | |
fun turnOnSpeaker(){ | |
speaker?.on() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment