I have the following code:
public boolean prontoParaJogar() throws RemoteException {
int i;
int j;
if (this.jogadores==2) {
this.jogando=1;
for (i=0;i<3;i++)
for(j=0;j<3;j++) {
this.tabuleiro[i][j]=0;
}
for (i=0;i<3;i++) {
System.out.println("Linha "+i+": ");
System.out.print(this.tabuleiro[i][0]+' ');
System.out.print(this.tabuleiro[i][1]+' ');
System.out.print(this.tabuleiro[i][2]);
System.out.println("");
}
return true;
} else {
return false;
}
}
it is printing the following exit:
Linha 0: 32320 Linha 1: 32320 Linha 2: 32320 Linha 0: 32320 Linha 1: 32320 Linha 2: 32320
This is not what I expected. It should be the following output:
Linha 0: 0 0 0 Linha 1: 0 0 0 Linha 2: 0 0 0
I can't figure out why its not running as expected.