error handling in game.java and error handling in figurecontroller.java