// trata evento de botao public void actionPerformed(ActionEvent event) { if (event.getSource() == conway) { GameView.this.dispose(); Tabuleiro frame = new Tabuleiro(controller, engine); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(500, 150, 400, 250); frame.setVisible(true); setStrategy(1); } if (event.getSource() == highlife) { GameView.this.dispose(); Tabuleiro frame = new Tabuleiro(controller, engine); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(500, 150, 400, 250); frame.setVisible(true); setStrategy(2); } if (event.getSource() == livefreeordie) { GameView.this.dispose(); Tabuleiro frame = new Tabuleiro(controller, engine); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setBounds(500, 150, 400, 250); frame.setVisible(true); setStrategy(3); } }