ableos/sysdata/programs/render_example/src/examples/amogus.hb

20 lines
629 B
Plaintext
Raw Normal View History

2024-09-13 16:41:31 -05:00
render := @use("../../../../libraries/render/src/lib.hb")
/* expected result:
the impostor travels left and loops around the screen */
example := fn(): void {
2024-10-14 19:24:29 -05:00
screen := render.init(true)
2024-09-13 16:41:31 -05:00
x := 0
loop {
2024-10-14 19:24:29 -05:00
render.put_rect(screen, .(200 - x, 80), .(430, 380), render.red)
render.put_rect(screen, .(630 - x, 120), .(120, 300), render.red)
render.put_rect(screen, .(200 - x, 460), .(160, 270), render.red)
render.put_rect(screen, .(470 - x, 460), .(160, 270), render.red)
render.put_rect(screen, .(140 - x, 140), .(340, 250), render.cyan)
render.sync(screen)
render.clear(screen, render.black)
2024-09-13 16:41:31 -05:00
x += 1
}
return
}