for (Zone zone : zones)
totalNumberOfCards += zone.getCardCount();
if (totalNumberOfCards == 0) {
title.setText("Tu as gagné");
SoundManager.playSound(new WaveSound("wav/gui/win.wav",
false));
} else {
title.setText("Tu as perdu");
SoundManager.playSound(new WaveSound("wav/gui/loose.wav",
false));
}
}
}
title.setFont(font);
title.setAlignmentX(JLabel.CENTER_ALIGNMENT);
labelPanel.add(title, BorderLayout.NORTH);
SoundManager.playSound(new TTSSound("",false));
String string = "\n";
for (cero.games.Player players : game.getPlayers()){
String substring = players.getPlayerName() + " : " + ((UnoPlayer) players).getPoints() + " points\n";
string += substring;
SoundManager.playSound(new TTSSound(substring + ".",false));
}
string+="\nVeux tu recommencer ?\n";
text = new JTextArea();
text.setText(string);
text.setAlignmentX(JTextArea.CENTER_ALIGNMENT);
text.setFont(font);
text.setBackground(null);
labelPanel.add(text, BorderLayout.CENTER);
SoundManager.playSound(new WaveSound("wav/gui/end.wav", false));
SoundManager.playSound(new WaveSound("wav/gui/buttons.wav", false));
}