All pastes #940643 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-13 03:35 UTC
rendered paste body
screen_width := 100
screen_height := 100
imagex1 := 1
imagey1 := 1
image_width := 32

x_add := 1
y_add := 1

while true :
  if (imagex1 + image_width) >= screen_width :
    x_add := -1
  else if imagex1 <= 0 :
    x_add := 1
  endif

  if (imagey1 + image_width) >= screen_height :
    y_add := -1
  else if imagey1 <= 0 :
    y_add := 1
  endif

  imagex1 := imagex1 + x_add
  imagey1 := imagey1 + y_add

  //render
end