www.main.lv
Don't think just code it

2009-09-07 Python PyGame Tutorial Box Object

There is new object Box. We can draw, mask and move it.Once you init it you can use it with simple interface
box = Box( position_x , position_y , size ,
(color_red,color_green,color_blue,color_alpha) )
moving box to new position. new position calculates x_new = x_old + x
box.move( add_x , add_y )
drawes box on the screen
box.draw()
draw black box on the screen
box.mask()

Tutorial Source