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

20 lines
546 B
Plaintext

render := @use("lib:render")
/* expected result:
the impostor travels left and loops around the screen */
example := fn(): void {
screen := render.init(true)
x := 0
loop {
screen.clear(render.BLACK)
screen.put_rect(.(200 - x, 80), .(430, 380), render.RED)
screen.put_rect(.(630 - x, 120), .(120, 300), render.RED)
screen.put_rect(.(200 - x, 460), .(160, 270), render.RED)
screen.put_rect(.(470 - x, 460), .(160, 270), render.RED)
screen.put_rect(.(140 - x, 140), .(340, 250), render.CYAN)
screen.sync()
x += 1
}
return
}