Adapted MainApp.java for handle Games