white = Color.new(255,255,255)
red = Color.new(255,0,0)
blue = Color.new(0, 0, 255)
green = Color.new(0,255,0)
black = Color.new(0,0,0)
grey = Color.new(150,150,150)
yellow = Color.new(255,255,0)
purple = Color.new(255,0,255)

function printCentered(y,text,color)
local length = string.len(text)
local x = 240 - ((length*8)/2)
screen:print(x,y,text,color)
end

while true do

dofile("Astroid_Escape/astroids.lua")

screen.waitVblankStart()
screen.flip()
oldpad = pad
end