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