Skip to content

Instantly share code, notes, and snippets.

@sasssass
Created June 19, 2020 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasssass/066dfdaab038d0b6685c73d7e745d3e2 to your computer and use it in GitHub Desktop.
Save sasssass/066dfdaab038d0b6685c73d7e745d3e2 to your computer and use it in GitHub Desktop.
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