My homework for C game in class