Created
August 24, 2021 21:23
-
-
Save Rillwz/077fdabbd56b6d8013448eb68db6173e to your computer and use it in GitHub Desktop.
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
| class Hero extends Character { | |
| String hitMonster() { | |
| return 'Take this..!'; | |
| } | |
| } | |
| !------------------------------------------------------ | |
| mixin DrinkAbility on Hero{ | |
| String drink() => 'gluk...gluk...gluk...'; | |
| } | |
| !------------------------------------------------------ | |
| class Knight extends Hero with DrinkAbility{ | |
| } | |
| !------------------------------------------------------ | |
| class main(List<String> arguments) { | |
| Knight k = Knight(); | |
| print(k.drink() + 'is hero'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment