added tests and code to game class