Can you please explain how this program works? I am interested in making my own game. Thank you in advance.