object { x 0 y 0 w 32 h 32 color cyan speed 7 } is player : right player 'x player.speed increment-by ; : left player 'x player.speed decrement-by ; 'right word player.direction! : draw-player player list ( x y w h color ) properties color rect ; : draw draw-player ; : move-player if player.x width player.w - greater then 'left word player.direction! endif if player.x 0 less then 'right word player.direction! endif player.direction eval ; : update move-player ; canvas { clear draw update } animation