Witam! To jest gierka która porównuje karty dwóch graczy. Czy mógłby ktoś mi podpowiedzieć co zrobić żeby wyświetlało który gracz wygrał i który wygrał więcej rund?
public class Exercise3{
public static void main(String[] args){
int[] player1 = {10, 6, 8, 9, 7, 12, 7};
int[] player2 = {7, 6, 9, 5, 2, 8, 11};
int[]roundNo = {1, 2, 3, 4, 5, 6, 7};
System.out.println("******************************Play Card Busters!****************************** ");
System.out.println(" ");
for(int i=0; i<roundNo.length; i++){
if(player1[i] > player2[i]){
System.out.println("Round No: " + roundNo[i] + "- " + "Player 1 wins the round: " + player1[i] + " " + "beats " + player2[i]);
System.out.println(" ");
}//if
else if(player1[i] == player2[i]){
System.out.println("Round No: " + roundNo[i] + "- " + "Tie! " + player1[i] + " " + "ties with " + player2[i]);
System.out.println(" ");
}//else if
else {
System.out.println("Round No: " + roundNo[i] + "- " + "Player 2 wins the round: " + player2[i] + " " + "beats " + player1[i]);
System.out.println(" ");
}//else
}//for
}//main
}//class