docs refined
This commit is contained in:
parent
11eadc1d9f
commit
f5a3fbe9a3
@ -365,8 +365,8 @@ Example:
|
||||
```lyng
|
||||
// Interface with state (id) and abstract requirements
|
||||
interface Character(val id) {
|
||||
abstract var health
|
||||
abstract var mana
|
||||
var health
|
||||
var mana
|
||||
|
||||
fun isAlive() = health > 0
|
||||
fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP"
|
||||
|
||||
@ -698,8 +698,8 @@ class OOTest {
|
||||
"""
|
||||
// Interface with state (id) and abstract requirements
|
||||
interface Character(val id) {
|
||||
abstract var health
|
||||
abstract var mana
|
||||
var health
|
||||
var mana
|
||||
fun isAlive() = health > 0
|
||||
fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP"
|
||||
// name is also abstractly required by the status method,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user