
def init():
	import os, sys
	#make sure lib will be loaded from ./lib
	try:
	    __file__
	except NameError:
	    pass
	else:
	    libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib'))
	    sys.path.insert(0, libdir)

#main
if __name__=="__main__":
	import pygame
	pygame.init()					#first
	screen = pygame.display.set_mode((320,240))	#the screen
	clock = pygame.time.Clock()			#the time

	#get the lib
	init()
	import data, color

	#accelerator
	exit_button = pygame.QUIT
	happen = pygame.event.peek
	fps = clock.tick
	flip = pygame.display.flip
	cls = screen.fill
	white = color.white

	while not happen(exit_button):
		fps(40)
		flip()
		cls(white)
