create game class inside a try block