Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void showBoard(){
- for(int i = 0; i < brojRedova; i++){
- for(int j = 0; j < brojKolona; j++){
- if (hIvice[i][j] < 1){
- System.out.print("· " + i + "," + j + " ");
- }else
- {
- if (hVlasnici[i][j] == 1){
- System.out.print("·------I------");
- }else if (hVlasnici[i][j] == 2){
- System.out.print("·------B------");
- }
- }
- }
- System.out.println("·");
- for (int k = 0; k < 2; k++){
- for(int j = 0; j < brojKolona; j++){
- if(vVlasnici[i][j] != 0){
- System.out.print("| ");
- }else{
- System.out.print(" ");
- }
- }
- if(vVlasnici[i][brojKolona] != 0){
- System.out.println("|");
- }else{
- System.out.println(" ");
- }
- }
- for(int j = 0; j <= brojKolona; j++){
- if (vIvice[i][j] < 1){
- System.out.print(i + "," + j + " ");
- }else
- {
- String vlasnik = " ";
- if(kvadrati[i][j] == 1){
- if (kVlasnici[i][j] == 1){
- vlasnik = " I ";
- }else{
- vlasnik = " B ";
- }
- }
- if (vVlasnici[i][j] == 1){
- System.out.print("I" + " " + vlasnik + " ");
- }else if (vVlasnici[i][j] == 2){
- System.out.print("B" + " " + vlasnik + " ");
- }
- }
- }
- System.out.println();
- for (int k = 0; k < 2; k++){
- for(int j = 0; j < brojKolona; j++){
- if(vVlasnici[i][j] != 0){
- System.out.print("| ");
- }else{
- System.out.print(" ");
- }
- }
- if(vVlasnici[i][brojKolona] != 0){
- System.out.println("|");
- }else
- {
- System.out.println(" ");
- }
- }
- }
- for(int j = 0; j < brojKolona; j++){
- System.out.print("· " + brojRedova + "," + j + " ");
- }
- System.out.println("·");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement