Commit 2bf341fa authored by amir's avatar amir

initial

parents
Pipeline #3173 failed with stages
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
System.out.println(" 0 1 2 3 4 5");
for (int i = 0; i < 3; i++){
System.out.print(i + "|");
for (int j = 0; j < 6; j++){
System.out.print("\uD83D\uDD34");
if ((j == 2) || (j == 5))
System.out.print("|");
else
System.out.print(" ");
}
System.out.println();
}
System.out.print(" ");
for (int j = 1; j < 15; j++)
System.out.print("_");
System.out.println();
for (int i = 3; i < 6; i++) {
System.out.print(i + "|");
for (int j1 = 0; j1 < 6; j1++) {
System.out.print("\uD83D\uDD34");
if ((j1 == 2) || (j1 == 5))
System.out.print("|");
else
System.out.print(" ");
}
if (i < 5)
System.out.println();
}
}
}
package com.company;
public class board1 extends smallBoards {
}
package com.company;
public class board2 extends smallBoards {
}
package com.company;
public class board3 extends smallBoards {
}
package com.company;
public class board4 extends smallBoards {
}
package com.company;
public class smallBoards {
private int[][] boardsCoordinate;
public smallBoards(){
boardsCoordinate = new int[3][3];
}
public int whichBoard(int x, int y){
if ((x >= 0) && (x < 3) && (y >= 0) && (y < 3))
return 1;
if ((x >= 3) && (x < 6) && (y >= 0) && (y < 3))
return 2;
if ((x >= 0) && (x < 3) && (y >= 3) && (y < 6))
return 1;
if ((x >= 3) && (x < 6) && (y >= 3) && (y < 6))
return 4;
return 12;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment