commit for homework 2 game logic