Skip to content

Commit

Permalink
chore: fixup
Browse files Browse the repository at this point in the history
Signed-off-by: moul <[email protected]>
  • Loading branch information
moul committed Nov 21, 2023
1 parent babd46c commit 219174e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions examples/gno.land/p/demo/tamagotchi/tamagotchi.gno
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ func (t *Tamagotchi) update() {
if t.age > t.maxAge {
t.age = t.maxAge
t.health = 0
}
if t.health == 0 {
t.sleepy = 0
t.happiness = 0
t.hunger = 0
Expand Down
11 changes: 6 additions & 5 deletions examples/gno.land/r/demo/tamagotchi/z0_filetest.gno
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ import (
)

func main() {
tamagotchi.Reset("tamagnotchi")
println(tamagotchi.Render(""))
}

// Output:
// # gnome#0 😵
// # tamagnotchi 😃
//
// * age: 100
// * hunger: 0
// * happiness: 0
// * health: 0
// * age: 0
// * hunger: 50
// * happiness: 50
// * health: 50
// * sleepy: 0
//
// Actions:
Expand Down

0 comments on commit 219174e

Please sign in to comment.