package villa1;
import Globales.*;
import Monstruos.*;
/*
 * Cargar.java
 *
 * Created on 28-ago-2009, 0:18:44
 */

/**
 *
 * @author Xabier
 */
public class ElecMons extends Inicio {

    /** Creates new form Cargar */
    public ElecMons() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        labelElecRiv = new javax.swing.JLabel();
        btnRata = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        btnRana = new javax.swing.JButton();
        btnPerro = new javax.swing.JButton();
        btnVolver = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("RpG Java - Elección Rival");

        labelElecRiv.setFont(new java.awt.Font("Tahoma", 2, 24)); // NOI18N
        labelElecRiv.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelElecRiv.setText(". Elección Rival .");

        btnRata.setText("Rata");
        btnRata.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRataActionPerformed(evt);
            }
        });

        jLabel2.setText("Contra quien te quieres enfrentar?");

        btnRana.setText("Rana");
        btnRana.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRanaActionPerformed(evt);
            }
        });

        btnPerro.setText("Perro");
        btnPerro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPerroActionPerformed(evt);
            }
        });

        btnVolver.setText("Volver");
        btnVolver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolverActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(labelElecRiv, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(jLabel2))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(75, 75, 75)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRana)
                            .addComponent(btnRata)
                            .addComponent(btnPerro)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addContainerGap(138, Short.MAX_VALUE)
                        .addComponent(btnVolver)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(labelElecRiv)
                .addGap(18, 18, 18)
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addComponent(btnRata)
                .addGap(18, 18, 18)
                .addComponent(btnRana)
                .addGap(18, 18, 18)
                .addComponent(btnPerro)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 123, Short.MAX_VALUE)
                .addComponent(btnVolver)
                .addContainerGap())
        );

        btnRata.getAccessibleContext().setAccessibleName("btnRata");
        btnRana.getAccessibleContext().setAccessibleName("btnRana");
        btnPerro.getAccessibleContext().setAccessibleName("btnPerro");
        btnVolver.getAccessibleContext().setAccessibleName("btnVolver");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnVolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolverActionPerformed
        this.hide();
        new villa1.NMenu().setVisible(true);        // TODO add your handling code here:
    }//GEN-LAST:event_btnVolverActionPerformed

    private void btnRataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRataActionPerformed
            Rata mons = new Rata(10,10,2,2,2,50,50,"Rata");
            rival = mons;
            batalla = new Globales.CBatalla();
            batalla.setVisible(true);
            this.hide();// TODO add your handling code here:
    }//GEN-LAST:event_btnRataActionPerformed

    private void btnRanaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRanaActionPerformed
            Rana mons = new Rana(20,3,3,3,3,10,10,"Rana");
            rival = mons;
            batalla = new Globales.CBatalla();
            batalla.setVisible(true);
            this.hide();// TODO add your handling code here:
    }//GEN-LAST:event_btnRanaActionPerformed

    private void btnPerroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPerroActionPerformed
            Perro mons = new Perro(30,9,3,6,4,15,15,"Perro");
            rival = mons;
            batalla = new Globales.CBatalla();
            batalla.setVisible(true);
            this.hide();// TODO add your handling code here:
    }//GEN-LAST:event_btnPerroActionPerformed

    /**
    * @param args the command line arguments
    */
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnPerro;
    private javax.swing.JButton btnRana;
    private javax.swing.JButton btnRata;
    private javax.swing.JButton btnVolver;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel labelElecRiv;
    // End of variables declaration//GEN-END:variables

}
