mobile game app algorithm