Created
June 19, 2020 18:10
-
-
Save sasssass/066dfdaab038d0b6685c73d7e745d3e2 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 CommandDemo { | |
fun doSth() { | |
val control = RemoteControl() | |
val light = Light() | |
control.pressButton(LightWhiteCommand(light)) | |
control.pressButton(LightRedCommand(light)) | |
control.pressButton(LightBlueCommand(light)) | |
control.undoButton() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment