Last active
October 15, 2018 15:52
-
-
Save waterlink/d110852c8dd434051fa382522809f051 to your computer and use it in GitHub Desktop.
step - 12
This file contains hidden or 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
private fun rules(first: Throw, | |
second: Throw, | |
block: GameRules.() -> Boolean) = | |
GameRules(first, second).run(block) | |
class GameRules(private val first: Throw, | |
private val second: Throw) { | |
infix fun Throw.beats(other: Throw) = | |
first == this && second == other | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment