added tests and code for game class