/** * Start a particular game */ private void startGame() { try { currentGame = (BasicGame) ((Class) games.get(index)).newInstance(); container.getGraphics().setBackground(Color.black); currentGame.init(container); currentGame.render(container, container.getGraphics()); } catch (Exception e) { Log.error(e); } container.setTitle(currentGame.getTitle()); }