package main.woj.ui;

import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

public class ScoreBoard extends JPanel{
	private JLabel label;
	public ScoreBoard(){
		setup();
		initComponents();
	}
	
	private void initComponents(){
		label = new JLabel("Scoreboard");
		add(label);
	}
	
	private void setup() {
		this.setSize(this.getMaximumSize());
		this.setLayout(new GridLayout(1,1));
	}
}



@@ -140,16 +140,19 @@
 Panel%7B%0A%09
+// 
 private 
@@ -166,16 +166,19 @@
 label;%0A%09
+// 
 public S
@@ -191,16 +191,19 @@
 ard()%7B%0A%09
+// 
 %09setup()
@@ -205,16 +205,19 @@
 tup();%0A%09
+// 
 %09initCom
@@ -224,29 +224,35 @@
 ponents();%0A%09
+// 
 %7D%0A%09%0A%09
+// 
 private void
@@ -271,16 +271,19 @@
 nts()%7B%0A%09
+// 
 %09label =
@@ -310,16 +310,19 @@
 ard%22);%0A%09
+// 
 %09add(lab
@@ -327,21 +327,27 @@
 abel);%0A%09
+// 
 %7D%0A%09%0A%09
+// 
 private 
@@ -362,16 +362,19 @@
 up() %7B%0A%09
+// 
 %09this.se
@@ -404,16 +404,19 @@
 ze());%0A%09
+// 
 %09this.se
@@ -445,15 +445,1412 @@
 (1,1));%0A
+%09// %7D%0A%09%0A%09private static String player1Name; %0A%09private static String player2Name; %0A%09private static int player1Score;%0A%09private static int player2Score; %0A%09private static String currentWinner; %0A%09private static int currentWinnerScore; %0A%09%0A%09public static void showScoreBoard(Game gameModel) %0A%09%7B%0A%09%09player1Name = gameModel.getPlayer1Information().getName(); %0A%09%09player2Name = gameModel.getPlayer2Information().getName();%0A%09%09player1Score = gameModel.getPlayer1Information().getGameScore(); %0A%09%09player2Score = gameModel.getPlayer2Information().getGameScore(); %0A%09%09currentWinner = %22%22; %0A%09%09currentWinnerScore = 0; %0A%09%09%0A%09%09if (player1Score %3E player2Score)%0A%09%09%7B%0A%09%09%09currentWinner = player1Name; %0A%09%09%09currentWinnerScore = player1Score; %0A%09%09%7D%0A%09%09else if (player1Score %3C player2Score)%0A%09%09%7B%0A%09%09%09currentWinner = player2Name; %0A%09%09%09currentWinnerScore = player2Score; %0A%09%09%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09currentWinner = %22Tie%22; %0A%09%09%09currentWinnerScore = player1Score; %0A%09%09%7D%0A%09%09%0A%09%09%0A%09%09String mainMessage = %22Player 1 Information%22 + %22%5Cn%22 + %22Name: %22 + player1Name + %22%5Cn%22 + %22Score: %22 + Integer.toString(player1Score)%0A%09%09%09+ %22%5Cn%22 + %22%5Cn%22 + %22Player 2 Information%22 + %22%5Cn%22 + %22Name: %22 + player2Name + %22%5Cn%22 + %22Score: %22 + Integer.toString(player2Score)%0A%09%09%09+ %22%5Cn%22 + %22%5Cn%22 + %22Current Winner Information%22 + %22%5Cn%22 + %22Name: %22 + currentWinner + %22%5Cn%22 + %22Score: %22 + Integer.toString(currentWinnerScore)%0A%09%09%09; %0A%09%09%0A%09%09JOptionPane.showMessageDialog(null, mainMessage,%22Score Board%22, 1);%09%0A
 %09%7D%0A%7D%0A%0A%0A

Update ScoreBoard to be Dialog Box rather than Panel