1
0

Adding fancy output ♕

This commit is contained in:
JanUlrich 2023-12-05 18:48:23 +01:00
parent ce3f868383
commit eefe942314

View File

@ -67,7 +67,11 @@ public class Main {
System.out.println("---------------");
for(int i=0; i<field.length; i++){
for(int j=0; j<field[i].length; j++) {
System.out.print(field[i][j]+" ");
switch(field[i][j]) {
case 1: System.out.print(""); break;
case 3: System.out.print("X "); break;
case 0: System.out.print(((i+j)%2==0)?"":""); break;
}
}
System.out.println();
}
@ -134,6 +138,7 @@ public class Main {
}
}
System.out.println("Finale Lösung: ");
for(int i = 0; i<field.length*field.length;i++)field[i/field.length][i%field.length]=field[i/field.length][i%field.length]%3;
QueensPrint(field);
}