package match.bonus.calculator;
import java.lang.Boolean[];
/**
*
* @author Parad0xs
*/
public class match extends javax.swing.JFrame {
/** Creates new form match */
public match() {
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">
private void initComponents() {
jToggleButton1 = new javax.swing.JToggleButton();
jScrollPane1 = new javax.swing.JScrollPane();
win = new javax.swing.JTextArea();
jScrollPane2 = new javax.swing.JScrollPane();
lose = new javax.swing.JTextArea();
jToggleButton2 = new javax.swing.JToggleButton();
jFormattedTextField1 = new javax.swing.JFormattedTextField();
Rank = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jToggleButton1.setText("Start");
jToggleButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jToggleButton1MouseClicked(evt);
}
});
jToggleButton1.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jToggleButton1StateChanged(evt);
}
});
win.setColumns(20);
win.setRows(5);
jScrollPane1.setViewportView(win);
lose.setColumns(20);
lose.setRows(5);
jScrollPane2.setViewportView(lose);
jToggleButton2.setText("Stop");
jToggleButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jToggleButton2MouseClicked(evt);
}
});
jFormattedTextField1.setColumns(2);
jFormattedTextField1.setText("jFormattedTextField1");
Rank.setText("Rank");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(57, 57, 57)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(75, 75, 75))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(jToggleButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Rank))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addGap(163, 163, 163)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 160, Short.MAX_VALUE)
.addComponent(jToggleButton2))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jToggleButton1)
.addComponent(jToggleButton2))
.addComponent(Rank))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(95, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
private void jToggleButton1StateChanged(javax.swing.event.ChangeEvent evt) {
// TODO add your handling code here:
}
private void jToggleButton1MouseClicked(java.awt.event.MouseEvent evt) {
int on;
on =1 ;
}
private void jToggleButton2MouseClicked(java.awt.event.MouseEvent evt) {
int on;
on =0;
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new match().setVisible(true);
}
});
}
// Variables declaration - do not modify
public javax.swing.JLabel Rank;
public javax.swing.JFormattedTextField jFormattedTextField1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
public javax.swing.JToggleButton jToggleButton1;
public javax.swing.JToggleButton jToggleButton2;
public javax.swing.JTextArea lose;
public javax.swing.JTextArea win;
// End of variables declaration
int winnerScale1;
int winnerScale2;
int playerScore1;
int playerScore2;
int gameLength;
int spm;
int spm1;
int timePlayed;
int piont;
int on;
spm1 = Rank % 61 ; // identifyer expexted
playerScore1 = ((winnerScale1 * ((gameLength/50) * spm))*(spm * timePlayed) / gameLength)); //identifier expected
playerScore2 = ( (winnerScale2 * ((gameLength/60) * spm))*(player.timePlayed / gameLength) ); // identifier expected
for(on=1; ){ // identifier expected
lose = playerScore2;
win = playerScore1;
}
}