added test and code to game class