I' m programming Minesweeper. I done it, but now my task is changed. I can't use If Else or Switch. Have you some advices how code this fragment without If ?
for (int i = 1; i <= M; i++) {
for (int j = 1; j <= N; j++)
if (bombs[i][j]) System.out.print("* ");
else System.out.print(". ");
System.out.println();
}
Thank in advance, Vika.
Aucun commentaire:
Enregistrer un commentaire