implemented full functionality and tested the game