Created
June 17, 2020 19:37
-
-
Save sasssass/622e7b70e31ad27c56bf9dc056639f0a 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 Speaker { | |
var on = false | |
fun playSound(name : String){ | |
if(on){ | |
print("show {$name}") | |
} | |
} | |
fun on(){ | |
on = true | |
} | |
fun off(){ | |
on = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment