first_paint.py

Created by mobluse

Created on June 02, 2024

347 Bytes

A paint program. Press the arrow keys to move the painting cursor. Quit by pressing the back key twice. This works in the version compiled from GitHub, and probably the next release.


# First Paint
from ion import *
from kandinsky import *
import time
def first_paint():
  x=160
  y=100
  while 1:
    if keydown(KEY_LEFT):
      x-=1
    if keydown(KEY_UP):
      y-=1
    if keydown(KEY_RIGHT):
      x+=1
    if keydown(KEY_DOWN):
      y+=1
    set_pixel(x,y,color(0,255,0))
    time.sleep(0.1)
first_paint()