sample source code for ios game