@ -24,13 +24,18 @@ public class Scoreboard extends JLabel{
}
public void updateScores() {
int gamesPlayed = 0;
for(int i = 0; i < playerPoints.length; i++){
if(i == 0) {
setText("Draws: " + playerPoints[0]);
} else {
setText(getText() + " Player " + i + ": " + playerPoints[i]);
gamesPlayed += playerPoints[i];
setText(getText() + " Games played: " + gamesPlayed);
@ -60,7 +60,7 @@ public class TicTacToeGame extends JPanel {
private void initScoreboard() {
scoreboard = new Scoreboard(maxPlayers);
scoreboard.setBounds(200, 100, 200, 50);
scoreboard.setBounds(150, 100, 300, 50);
add(scoreboard);