docs refined

This commit is contained in:
sergeych committed 2026-01-04 22:50:49 +01:00
1 parent 11eadc1d9f
commit f5a3fbe9a3
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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"
+2 -2
View File
@@ -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,