Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
659 lines (629 sloc) 66.6 KB
<html>
<head>
<title>Interface.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.s0 { color: #cc7832;}
.s1 { color: #a9b7c6;}
.s2 { color: #6a8759;}
.s3 { color: #6897bb;}
</style>
</head>
<body bgcolor="#2b2b2b">
<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#606060" >
<tr><td><center>
<font face="Arial, Helvetica" color="#000000">
Interface.java</font>
</center></td></tr></table>
<pre><span class="s0">import </span><span class="s1">javax.swing.*</span><span class="s0">;</span>
<span class="s0">import </span><span class="s1">java.awt.*</span><span class="s0">;</span>
<span class="s0">import </span><span class="s1">java.awt.event.*</span><span class="s0">;</span>
<span class="s0">import </span><span class="s1">java.util.concurrent.TimeUnit</span><span class="s0">;</span>
<span class="s0">public class </span><span class="s1">Interface </span><span class="s0">extends </span><span class="s1">JFrame {</span>
<span class="s0">private </span><span class="s1">JButton bAttack</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bKill</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bAssist</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bHitError</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bSeamus</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bChris</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bJason</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bAndrew</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bMax</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JPanel pMain</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bDavidN</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bSetError</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bServeIn</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bAce</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bServeError</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bDig</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bRecError</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bBlockS</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bBlockA</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bBlockE</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bBrennan</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bStone</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bSebby</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bVu</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bDavidR</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bJP</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bWill</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel a12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel k12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel he12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel as12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel dc12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel si12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ac12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel se12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel d12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel r12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel bs12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel ba12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be0</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be1</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be2</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be3</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be4</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be5</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be6</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be7</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be8</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be9</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be10</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be11</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JLabel be12</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bPositive</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton bNegative</span><span class="s0">;</span>
<span class="s0">private </span><span class="s1">JButton updateButton</span><span class="s0">;</span>
<span class="s0">private int </span><span class="s1">currentPlayer</span><span class="s0">;</span>
<span class="s0">private boolean </span><span class="s1">isPositive</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] a</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] k</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] he</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] as</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] dc</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] si</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] ac</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] se</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] d</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] r</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] bs</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] ba</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">JLabel[] be</span><span class="s0">;</span>
<span class="s0">public </span><span class="s1">Interface(</span><span class="s0">boolean </span><span class="s1">isTotal) {</span>
<span class="s1">add(pMain)</span><span class="s0">;</span>
<span class="s1">setTitle(</span><span class="s2">&quot;Stats&quot;</span><span class="s1">)</span><span class="s0">;</span>
<span class="s1">setSize(</span><span class="s3">1400</span><span class="s0">,</span><span class="s3">1000</span><span class="s1">)</span><span class="s0">;</span>
<span class="s1">setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE)</span><span class="s0">;</span>
<span class="s1">a = </span><span class="s0">new </span><span class="s1">JLabel[]{a0</span><span class="s0">, </span><span class="s1">a1</span><span class="s0">, </span><span class="s1">a2</span><span class="s0">, </span><span class="s1">a3</span><span class="s0">, </span><span class="s1">a4</span><span class="s0">, </span><span class="s1">a5</span><span class="s0">, </span><span class="s1">a6</span><span class="s0">, </span><span class="s1">a7</span><span class="s0">, </span><span class="s1">a8</span><span class="s0">, </span><span class="s1">a9</span><span class="s0">, </span><span class="s1">a10</span><span class="s0">, </span><span class="s1">a11</span><span class="s0">, </span><span class="s1">a12}</span><span class="s0">;</span>
<span class="s1">k = </span><span class="s0">new </span><span class="s1">JLabel[]{k0</span><span class="s0">, </span><span class="s1">k1</span><span class="s0">, </span><span class="s1">k2</span><span class="s0">, </span><span class="s1">k3</span><span class="s0">, </span><span class="s1">k4</span><span class="s0">, </span><span class="s1">k5</span><span class="s0">, </span><span class="s1">k6</span><span class="s0">, </span><span class="s1">k7</span><span class="s0">, </span><span class="s1">k8</span><span class="s0">, </span><span class="s1">k9</span><span class="s0">, </span><span class="s1">k10</span><span class="s0">, </span><span class="s1">k11</span><span class="s0">, </span><span class="s1">k12}</span><span class="s0">;</span>
<span class="s1">he = </span><span class="s0">new </span><span class="s1">JLabel[]{he0</span><span class="s0">, </span><span class="s1">he1</span><span class="s0">, </span><span class="s1">he2</span><span class="s0">, </span><span class="s1">he3</span><span class="s0">, </span><span class="s1">he4</span><span class="s0">, </span><span class="s1">he5</span><span class="s0">, </span><span class="s1">he6</span><span class="s0">, </span><span class="s1">he7</span><span class="s0">, </span><span class="s1">he8</span><span class="s0">, </span><span class="s1">he9</span><span class="s0">, </span><span class="s1">he10</span><span class="s0">, </span><span class="s1">he11</span><span class="s0">, </span><span class="s1">he12}</span><span class="s0">;</span>
<span class="s1">as = </span><span class="s0">new </span><span class="s1">JLabel[]{as0</span><span class="s0">, </span><span class="s1">as1</span><span class="s0">, </span><span class="s1">as2</span><span class="s0">, </span><span class="s1">as3</span><span class="s0">, </span><span class="s1">as4</span><span class="s0">, </span><span class="s1">as5</span><span class="s0">, </span><span class="s1">as6</span><span class="s0">, </span><span class="s1">as7</span><span class="s0">, </span><span class="s1">as8</span><span class="s0">, </span><span class="s1">as9</span><span class="s0">, </span><span class="s1">as10</span><span class="s0">, </span><span class="s1">as11</span><span class="s0">, </span><span class="s1">as12}</span><span class="s0">;</span>
<span class="s1">dc = </span><span class="s0">new </span><span class="s1">JLabel[]{dc0</span><span class="s0">, </span><span class="s1">dc1</span><span class="s0">, </span><span class="s1">dc2</span><span class="s0">, </span><span class="s1">dc3</span><span class="s0">, </span><span class="s1">dc4</span><span class="s0">, </span><span class="s1">dc5</span><span class="s0">, </span><span class="s1">dc6</span><span class="s0">, </span><span class="s1">dc7</span><span class="s0">, </span><span class="s1">dc8</span><span class="s0">, </span><span class="s1">dc9</span><span class="s0">, </span><span class="s1">dc10</span><span class="s0">, </span><span class="s1">dc11</span><span class="s0">, </span><span class="s1">dc12}</span><span class="s0">;</span>
<span class="s1">si = </span><span class="s0">new </span><span class="s1">JLabel[]{si0</span><span class="s0">, </span><span class="s1">si1</span><span class="s0">, </span><span class="s1">si2</span><span class="s0">, </span><span class="s1">si3</span><span class="s0">, </span><span class="s1">si4</span><span class="s0">, </span><span class="s1">si5</span><span class="s0">, </span><span class="s1">si6</span><span class="s0">, </span><span class="s1">si7</span><span class="s0">, </span><span class="s1">si8</span><span class="s0">, </span><span class="s1">si9</span><span class="s0">, </span><span class="s1">si10</span><span class="s0">, </span><span class="s1">si11</span><span class="s0">, </span><span class="s1">si12}</span><span class="s0">;</span>
<span class="s1">ac = </span><span class="s0">new </span><span class="s1">JLabel[]{ac0</span><span class="s0">, </span><span class="s1">ac1</span><span class="s0">, </span><span class="s1">ac2</span><span class="s0">, </span><span class="s1">ac3</span><span class="s0">, </span><span class="s1">ac4</span><span class="s0">, </span><span class="s1">ac5</span><span class="s0">, </span><span class="s1">ac6</span><span class="s0">, </span><span class="s1">ac7</span><span class="s0">, </span><span class="s1">ac8</span><span class="s0">, </span><span class="s1">ac9</span><span class="s0">, </span><span class="s1">ac10</span><span class="s0">, </span><span class="s1">ac11</span><span class="s0">, </span><span class="s1">ac12}</span><span class="s0">;</span>
<span class="s1">se = </span><span class="s0">new </span><span class="s1">JLabel[]{se0</span><span class="s0">, </span><span class="s1">se1</span><span class="s0">, </span><span class="s1">se2</span><span class="s0">, </span><span class="s1">se3</span><span class="s0">, </span><span class="s1">se4</span><span class="s0">, </span><span class="s1">se5</span><span class="s0">, </span><span class="s1">se6</span><span class="s0">, </span><span class="s1">se7</span><span class="s0">, </span><span class="s1">se8</span><span class="s0">, </span><span class="s1">se9</span><span class="s0">, </span><span class="s1">se10</span><span class="s0">, </span><span class="s1">se11</span><span class="s0">, </span><span class="s1">se12}</span><span class="s0">;</span>
<span class="s1">d = </span><span class="s0">new </span><span class="s1">JLabel[]{d0</span><span class="s0">, </span><span class="s1">d1</span><span class="s0">, </span><span class="s1">d2</span><span class="s0">, </span><span class="s1">d3</span><span class="s0">, </span><span class="s1">d4</span><span class="s0">, </span><span class="s1">d5</span><span class="s0">, </span><span class="s1">d6</span><span class="s0">, </span><span class="s1">d7</span><span class="s0">, </span><span class="s1">d8</span><span class="s0">, </span><span class="s1">d9</span><span class="s0">, </span><span class="s1">d10</span><span class="s0">, </span><span class="s1">d11</span><span class="s0">, </span><span class="s1">d12}</span><span class="s0">;</span>
<span class="s1">r = </span><span class="s0">new </span><span class="s1">JLabel[]{r0</span><span class="s0">, </span><span class="s1">r1</span><span class="s0">, </span><span class="s1">r2</span><span class="s0">, </span><span class="s1">r3</span><span class="s0">, </span><span class="s1">r4</span><span class="s0">, </span><span class="s1">r5</span><span class="s0">, </span><span class="s1">r6</span><span class="s0">, </span><span class="s1">r7</span><span class="s0">, </span><span class="s1">r8</span><span class="s0">, </span><span class="s1">r9</span><span class="s0">, </span><span class="s1">r10</span><span class="s0">, </span><span class="s1">r11</span><span class="s0">, </span><span class="s1">r12}</span><span class="s0">;</span>
<span class="s1">bs = </span><span class="s0">new </span><span class="s1">JLabel[]{bs0</span><span class="s0">, </span><span class="s1">bs1</span><span class="s0">, </span><span class="s1">bs2</span><span class="s0">, </span><span class="s1">bs3</span><span class="s0">, </span><span class="s1">bs4</span><span class="s0">, </span><span class="s1">bs5</span><span class="s0">, </span><span class="s1">bs6</span><span class="s0">, </span><span class="s1">bs7</span><span class="s0">, </span><span class="s1">bs8</span><span class="s0">, </span><span class="s1">bs9</span><span class="s0">, </span><span class="s1">bs10</span><span class="s0">, </span><span class="s1">bs11</span><span class="s0">, </span><span class="s1">bs12}</span><span class="s0">;</span>
<span class="s1">ba = </span><span class="s0">new </span><span class="s1">JLabel[]{ba0</span><span class="s0">, </span><span class="s1">ba1</span><span class="s0">, </span><span class="s1">ba2</span><span class="s0">, </span><span class="s1">ba3</span><span class="s0">, </span><span class="s1">ba4</span><span class="s0">, </span><span class="s1">ba5</span><span class="s0">, </span><span class="s1">ba6</span><span class="s0">, </span><span class="s1">ba7</span><span class="s0">, </span><span class="s1">ba8</span><span class="s0">, </span><span class="s1">ba9</span><span class="s0">, </span><span class="s1">ba10</span><span class="s0">, </span><span class="s1">ba11</span><span class="s0">, </span><span class="s1">ba12}</span><span class="s0">;</span>
<span class="s1">be = </span><span class="s0">new </span><span class="s1">JLabel[]{be0</span><span class="s0">, </span><span class="s1">be1</span><span class="s0">, </span><span class="s1">be2</span><span class="s0">, </span><span class="s1">be3</span><span class="s0">, </span><span class="s1">be4</span><span class="s0">, </span><span class="s1">be5</span><span class="s0">, </span><span class="s1">be6</span><span class="s0">, </span><span class="s1">be7</span><span class="s0">, </span><span class="s1">be8</span><span class="s0">, </span><span class="s1">be9</span><span class="s0">, </span><span class="s1">be10</span><span class="s0">, </span><span class="s1">be11</span><span class="s0">, </span><span class="s1">be12}</span><span class="s0">;</span>
<span class="s1">JButton[] players = {bChris</span><span class="s0">, </span><span class="s1">bDavidN</span><span class="s0">, </span><span class="s1">bJason</span><span class="s0">, </span><span class="s1">bMax</span><span class="s0">, </span><span class="s1">bAndrew</span><span class="s0">, </span><span class="s1">bSeamus</span><span class="s0">, </span><span class="s1">bBrennan</span><span class="s0">, </span><span class="s1">bStone</span><span class="s0">, </span><span class="s1">bSebby</span><span class="s0">, </span><span class="s1">bVu</span><span class="s0">, </span><span class="s1">bDavidR</span><span class="s0">, </span><span class="s1">bJP</span><span class="s0">, </span><span class="s1">bWill}</span><span class="s0">;</span>
<span class="s0">for </span><span class="s1">(</span><span class="s0">int </span><span class="s1">i = </span><span class="s3">0</span><span class="s0">; </span><span class="s1">i &lt; </span><span class="s3">13</span><span class="s0">; </span><span class="s1">i++) {</span>
<span class="s1">players[i].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">players[i].setOpaque(</span><span class="s0">true</span><span class="s1">)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">bChris.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s1">currentPlayer = </span><span class="s3">0</span><span class="s0">;</span>
<span class="s1">bPositive.setForeground(Color.green)</span><span class="s0">;</span>
<span class="s1">bNegative.setForeground(Color.red)</span><span class="s0">;</span>
<span class="s1">bPositive.setOpaque(</span><span class="s0">true</span><span class="s1">)</span><span class="s0">;</span>
<span class="s1">bNegative.setOpaque(</span><span class="s0">true</span><span class="s1">)</span><span class="s0">;</span>
<span class="s1">bPositive.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s1">bNegative.setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">isPositive = </span><span class="s0">true;</span>
<span class="s0">if </span><span class="s1">(!isTotal) {</span>
<span class="s1">bPositive.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bPositive.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s1">bNegative.setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">isPositive = </span><span class="s0">true;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bNegative.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bNegative.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s1">bPositive.setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">isPositive = </span><span class="s0">false;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bAttack.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(a[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">a[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bKill.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(k[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">k[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bHitError.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(he[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">he[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bAssist.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(as[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">as[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bSetError.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(dc[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">dc[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bServeIn.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(si[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">si[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bAce.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(ac[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">ac[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bServeError.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(se[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">se[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bDig.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(d[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">d[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bRecError.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(r[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">r[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bBlockS.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(bs[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">bs[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bBlockA.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(ba[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">ba[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bBlockE.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">int </span><span class="s1">x = Integer.parseInt(be[currentPlayer].getText())</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(isPositive) {</span>
<span class="s1">x++</span><span class="s0">;</span>
<span class="s1">} </span><span class="s0">else </span><span class="s1">{</span>
<span class="s0">if </span><span class="s1">(x &gt; </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">x--</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">be[currentPlayer].setText(</span><span class="s2">&quot;&quot; </span><span class="s1">+ x)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bChris.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bChris.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">0</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">0</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bDavidN.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bDavidN.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">1</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">1</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bJason.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bJason.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">2</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">2</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bMax.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bMax.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">3</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">3</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bAndrew.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bAndrew.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">4</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">4</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bSeamus.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bSeamus.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">5</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">5</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bBrennan.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bBrennan.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">6</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">6</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bStone.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bStone.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">7</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">7</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bSebby.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bSebby.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">8</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">8</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bVu.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bVu.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">9</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">9</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bDavidR.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bDavidR.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">10</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">10</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bJP.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bJP.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">11</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">11</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">bWill.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s1">bWill.setBackground(Color.blue)</span><span class="s0">;</span>
<span class="s0">if </span><span class="s1">(currentPlayer != </span><span class="s3">12</span><span class="s1">) {</span>
<span class="s1">players[currentPlayer].setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">currentPlayer = </span><span class="s3">12</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s0">else</span>
<span class="s1">{</span>
<span class="s1">bPositive.setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">bChris.setBackground(Color.lightGray)</span><span class="s0">;</span>
<span class="s1">updateButton.addActionListener(</span><span class="s0">new </span><span class="s1">ActionListener() {</span>
<span class="s1">@Override</span>
<span class="s0">public void </span><span class="s1">actionPerformed(ActionEvent e) {</span>
<span class="s0">for </span><span class="s1">(</span><span class="s0">int </span><span class="s1">i=</span><span class="s3">0</span><span class="s0">; </span><span class="s1">i &lt; </span><span class="s3">13</span><span class="s0">; </span><span class="s1">i++)</span>
<span class="s1">{</span>
<span class="s1">a[i].setText(Menu.getTotals(</span><span class="s2">&quot;a&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">k[i].setText(Menu.getTotals(</span><span class="s2">&quot;k&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">he[i].setText(Menu.getTotals(</span><span class="s2">&quot;he&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">as[i].setText(Menu.getTotals(</span><span class="s2">&quot;as&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">dc[i].setText(Menu.getTotals(</span><span class="s2">&quot;dc&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">si[i].setText(Menu.getTotals(</span><span class="s2">&quot;si&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">ac[i].setText(Menu.getTotals(</span><span class="s2">&quot;ac&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">se[i].setText(Menu.getTotals(</span><span class="s2">&quot;se&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">d[i].setText(Menu.getTotals(</span><span class="s2">&quot;d&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">r[i].setText(Menu.getTotals(</span><span class="s2">&quot;r&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">bs[i].setText(Menu.getTotals(</span><span class="s2">&quot;bs&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">ba[i].setText(Menu.getTotals(</span><span class="s2">&quot;ba&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">be[i].setText(Menu.getTotals(</span><span class="s2">&quot;be&quot;</span><span class="s1">)[i].getText())</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">})</span><span class="s0">;</span>
<span class="s1">}</span>
<span class="s1">}</span>
<span class="s1">}</span>
</pre>
</body>
</html>
You can’t perform that action at this time.