Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package veya;
- import java.awt.BorderLayout;
- import java.awt.GridLayout;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import javax.swing.Icon;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JOptionPane;
- import javax.swing.JPanel;
- public class Jogo extends JFrame implements ActionListener{
- JButton BMatrizBotao[][] = new JButton [3][3];
- JPanel PainelCentro, PainelNorte;
- Icon iHumano, iIa;
- //JLabel kkkkk
- int vLU[] = new int [3];
- int vCU[] = new int [3];
- int vLC[] = new int [3];
- int vCC[] = new int [3];
- int diagPU;
- int diagPC;
- int diagSU;
- int diagSC;
- boolean matBool[][] = new boolean [3][3];
- public Jogo(){//bls
- super("Juego de la Abuela!!!");
- Inicia();
- CriaComponentes();
- setLayout(new BorderLayout());
- PainelCentro = new JPanel(new GridLayout(3,3,2,2));
- int i, j;
- for (i=0; i<3;i++){
- for (j=0;j<3;j++){
- BMatrizBotao [i][j] = new JButton();
- PainelCentro.add(BMatrizBotao [i][j]);
- BMatrizBotao [i][j].addActionListener(this);
- }
- }
- add(PainelCentro, BorderLayout.CENTER);
- Vez(Integer.parseInt(JOptionPane.showInputDialog(null, "Escolher o primeiro a jogar: \n0- Usuario\n1- PC")));
- }
- public void Inicia(){ //bls
- int i, j;
- for (i=0; i<3; i++){
- vLU[i] = 0;
- vCU[i] = 0;
- vLC[i] = 0;
- vCC[i] = 0;
- for (j=0; j<3; j++){
- matBool[i][j] = false;
- }
- diagPU = 0;
- diagPC = 0;
- diagSU = 0;
- diagSC = 0;
- }
- }
- public boolean JogoVencido (int q){//bls
- boolean venc = false;
- int i;
- if (q == 0){
- for (i=0; i<3; i++){
- if (vLU [i] == 3){
- venc = true;
- return venc;
- }
- if (vCU [i] == 3){
- venc = true;
- return venc;
- }
- }
- if (diagPU == 3){
- venc = true;
- return venc;
- }
- if (diagSU == 3){
- venc = true;
- return venc;
- }
- }
- else{
- for (i=0; i<3; i++){
- if (vLC [i] == 3){
- venc = true;
- return venc;
- }
- if (vCC [i] == 3){
- venc = true;
- return venc;
- }
- }
- if (diagPC== 3){
- venc = true;
- return venc;
- }
- if (diagSC == 3){
- venc = true;
- return venc;
- }
- }
- return venc;
- }
- public boolean Cheia(){//bls
- boolean chei = true;
- int i, j;
- for (i=0; i<3; i++){
- for (j=0; j<3; j++){
- if (matBool [i][j] == false){
- chei = false;
- return chei;
- }
- }
- }
- return chei;
- }
- public void CriaComponentes(){//bls
- iHumano = new ImageIcon (getClass().getResource("Humano.gif"));
- iIa = new ImageIcon (getClass().getResource("Computado.gif"));
- int i, j;
- for (i=0; i<3; i++){
- for (j=0; j<3; j++){
- BMatrizBotao [i][j] = new JButton();
- BMatrizBotao [i][j].addActionListener(this);
- }
- }
- }
- public void ComputadorVez(){//BLS
- //VERIFICA SE O PC GANHA
- if (diagPU == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagPC += 1;
- diagSC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (diagSU == 2){
- if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vCU[0] == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][0] == false){
- BMatrizBotao [1][0].setIcon(iIa);
- BMatrizBotao [1][0].setEnabled(false);
- matBool [1][0] = true;
- vLC [1] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vCU[1] == 2){
- if (matBool[0][1] == false){
- BMatrizBotao [0][1].setIcon(iIa);
- BMatrizBotao [0][1].setEnabled(false);
- matBool [0][1] = true;
- vLC [0] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][1] == false){
- BMatrizBotao [2][1].setIcon(iIa);
- BMatrizBotao [2][1].setEnabled(false);
- matBool [2][1] = true;
- vLC [2] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }
- }
- if (vCU[2] == 2){
- if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[1][2] == false){
- BMatrizBotao [1][2].setIcon(iIa);
- BMatrizBotao [1][2].setEnabled(false);
- matBool [1][2] = true;
- vLC [1] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vLU[0] == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[0][1] == false){
- BMatrizBotao [0][1].setIcon(iIa);
- BMatrizBotao [0][1].setEnabled(false);
- matBool [0][1] = true;
- vLC [0] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (vLU[1] == 2){
- if (matBool[1][0] == false){
- BMatrizBotao [1][0].setIcon(iIa);
- BMatrizBotao [1][0].setEnabled(false);
- matBool [1][0] = true;
- vLC [1] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[1][2] == false){
- BMatrizBotao [1][2].setIcon(iIa);
- BMatrizBotao [1][2].setEnabled(false);
- matBool [1][2] = true;
- vLC [1] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (vLU[2] == 2){
- if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[2][1] == false){
- BMatrizBotao [2][1].setIcon(iIa);
- BMatrizBotao [2][1].setEnabled(false);
- matBool [2][1] = true;
- vLC [2] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- //FIM DO VERIFICA
- //VERIFICA SE USUARIO GANHA
- if (diagPC == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagPC += 1;
- diagSC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (diagSC == 2){
- if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vCC[0] == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][0] == false){
- BMatrizBotao [1][0].setIcon(iIa);
- BMatrizBotao [1][0].setEnabled(false);
- matBool [1][0] = true;
- vLC [1] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vCC[1] == 2){
- if (matBool[0][1] == false){
- BMatrizBotao [0][1].setIcon(iIa);
- BMatrizBotao [0][1].setEnabled(false);
- matBool [0][1] = true;
- vLC [0] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][1] == false){
- BMatrizBotao [2][1].setIcon(iIa);
- BMatrizBotao [2][1].setEnabled(false);
- matBool [2][1] = true;
- vLC [2] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }
- }
- if (vCC[2] == 2){
- if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[1][2] == false){
- BMatrizBotao [1][2].setIcon(iIa);
- BMatrizBotao [1][2].setEnabled(false);
- matBool [1][2] = true;
- vLC [1] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }
- }
- if (vLC[0] == 2){
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[0][1] == false){
- BMatrizBotao [0][1].setIcon(iIa);
- BMatrizBotao [0][1].setEnabled(false);
- matBool [0][1] = true;
- vLC [0] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (vLC[1] == 2){
- if (matBool[1][0] == false){
- BMatrizBotao [1][0].setIcon(iIa);
- BMatrizBotao [1][0].setEnabled(false);
- matBool [1][0] = true;
- vLC [1] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagSC += 1;
- diagPC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[1][2] == false){
- BMatrizBotao [1][2].setIcon(iIa);
- BMatrizBotao [1][2].setEnabled(false);
- matBool [1][2] = true;
- vLC [1] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- if (vLC[2] == 2){
- if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[2][1] == false){
- BMatrizBotao [2][1].setIcon(iIa);
- BMatrizBotao [2][1].setEnabled(false);
- matBool [2][1] = true;
- vLC [2] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- }
- //FIM DO VERIFICA
- //PC JOGA
- if (matBool[0][0] == false){
- BMatrizBotao [0][0].setIcon(iIa);
- BMatrizBotao [0][0].setEnabled(false);
- matBool [0][0] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[0][1] == false){
- BMatrizBotao [0][1].setIcon(iIa);
- BMatrizBotao [0][1].setEnabled(false);
- matBool [0][1] = true;
- diagPC += 1;
- vLC [0] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[0][2] == false){
- BMatrizBotao [0][2].setIcon(iIa);
- BMatrizBotao [0][2].setEnabled(false);
- matBool [0][2] = true;
- diagSC += 1;
- vLC [0] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[1][0] == false){
- BMatrizBotao [1][0].setIcon(iIa);
- BMatrizBotao [1][0].setEnabled(false);
- matBool [1][0] = true;
- diagPC += 1;
- vLC [1] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[1][1] == false){
- BMatrizBotao [1][1].setIcon(iIa);
- BMatrizBotao [1][1].setEnabled(false);
- matBool [1][1] = true;
- diagPC += 1;
- diagSC += 1;
- vLC [1] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[1][2] == false){
- BMatrizBotao [1][2].setIcon(iIa);
- BMatrizBotao [1][2].setEnabled(false);
- matBool [1][2] = true;
- vLC [1] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }else if (matBool[2][0] == false){
- BMatrizBotao [2][0].setIcon(iIa);
- BMatrizBotao [2][0].setEnabled(false);
- matBool [2][0] = true;
- diagSC += 1;
- vLC [2] += 1;
- vCC [0] += 1;
- Vez(0);
- return;
- }else if (matBool[2][1] == false){
- BMatrizBotao [2][1].setIcon(iIa);
- BMatrizBotao [2][1].setEnabled(false);
- matBool [2][1] = true;
- vLC [2] += 1;
- vCC [1] += 1;
- Vez(0);
- return;
- }else if (matBool[2][2] == false){
- BMatrizBotao [2][2].setIcon(iIa);
- BMatrizBotao [2][2].setEnabled(false);
- matBool [2][2] = true;
- diagPC += 1;
- vLC [2] += 1;
- vCC [2] += 1;
- Vez(0);
- return;
- }
- //FOM
- }
- public void Vez(int num){//bls
- boolean empat = false;
- boolean venceu = false;
- venceu = JogoVencido (0);
- if (venceu == true){
- JOptionPane.showMessageDialog(null, "Tu ganhastes, meu puto!");
- System.exit(0);
- }else{
- empat = Cheia();
- if (empat == true){
- JOptionPane.showMessageDialog(null, "Empatastes com a maquina, meu querido");
- System.exit(0);
- }else {
- venceu = JogoVencido (1);
- if (venceu == true){
- JOptionPane.showMessageDialog(null, "La maquina gañas. La atrocidad!");
- System.exit(0);
- }
- }
- }
- if (num == 0){
- JOptionPane.showMessageDialog(null, "Tua vez, querido.");
- }else {
- JOptionPane.showMessageDialog(null, "Vez de la maquina.");
- ComputadorVez();
- }
- }
- public void actionPerformed(ActionEvent e){//bls
- if (e.getSource() == BMatrizBotao[0][0]){
- BMatrizBotao[0][0].setIcon(iHumano);
- BMatrizBotao[0][0].setEnabled(false);
- matBool[0][0] = true;
- diagPU += 1;
- vLU [0] += 1;
- vCU [0] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[0][1]){
- BMatrizBotao[0][1].setIcon(iHumano);
- BMatrizBotao[0][1].setEnabled(false);
- matBool[0][1] = true;
- vLU [0] += 1;
- vCU [1] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[0][2]){
- BMatrizBotao[0][2].setIcon(iHumano);
- BMatrizBotao[0][2].setEnabled(false);
- matBool[0][2] = true;
- diagSU += 1;
- vLU [0] += 1;
- vCU [2] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[1][0]){
- BMatrizBotao[1][0].setIcon(iHumano);
- BMatrizBotao[1][0].setEnabled(false);
- matBool[1][0] = true;
- vLU [1] += 1;
- vCU [0] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[1][1]){
- BMatrizBotao[1][1].setIcon(iHumano);
- BMatrizBotao[1][1].setEnabled(false);
- matBool[1][1] = true;
- diagPU += 1;
- diagSU += 1;
- vLU [1] += 1;
- vCU [1] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[1][2]){
- BMatrizBotao[1][2].setIcon(iHumano);
- BMatrizBotao[1][2].setEnabled(false);
- matBool[1][2] = true;
- vLU [1] += 1;
- vCU [2] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[2][0]){
- BMatrizBotao[2][0].setIcon(iHumano);
- BMatrizBotao[2][0].setEnabled(false);
- matBool[2][0] = true;
- diagSU += 1;
- vLU [2] += 1;
- vCU [0] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[2][1]){
- BMatrizBotao[2][1].setIcon(iHumano);
- BMatrizBotao[2][1].setEnabled(false);
- matBool[2][1] = true;
- vLU [2] += 1;
- vCU [1] += 1;
- Vez (1);
- }
- if (e.getSource() == BMatrizBotao[2][2]){
- BMatrizBotao[2][2].setIcon(iHumano);
- BMatrizBotao[2][2].setEnabled(false);
- matBool[2][2] = true;
- diagPU += 1;
- vLU [2] += 1;
- vCU [2] += 1;
- Vez (1);
- }
- }
- public static void main (String [] args){//bls
- Jogo J = new Jogo ();
- J.setDefaultCloseOperation(EXIT_ON_CLOSE);
- J.setSize(500,500);
- J.setLocation(200,200);
- J.setVisible (true);
- }
- }
- //imagens: https://imgur.com/a/ncMmuwM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement