Moving game function to another file