import java.util.*;
public class Dama
{
public static void main(String[]args){
boolean hraBezi = true;
int bilaFigurka = 1;
// int cernaFigurka = 2;
int prazdnePole = 0;
int x, y;
int sachovnice [][] = {
{1, 0, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 1, 0, 1},
{1, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 2, 0, 2, 0, 2, 0, 2},
{2, 0, 2, 0, 2, 0, 2, 0},
{0, 2, 0, 2, 0, 2, 0, 2},
};
System.out.println("**********************");
while(hraBezi){
for (int i = 0; i < sachovnice.length; i++) { //pruchod pres pole poli
for (int j = 0; j < sachovnice[i].length; j++) { //pruchod samotnym polem (radkem)
System.out.print(sachovnice[i][j] + " "); //bez odradkovani
}
System.out.println(""); //odradkovani
}
Scanner sc = new Scanner(System.in);
System.out.println("Odkud budeme táhnout?");
String odkud = sc.next();
System.out.println("Kam budeme táhnout?");
String kam = sc.next();
x = odkud.charAt(0) - 'A';
y = odkud.charAt(1) - '1';
sachovnice[x][y] = 1;
sachovnice[x][y] = 0;
x = kam.charAt(0) - 'A';
y = kam.charAt(1) - '1';
sachovnice [x][y] = bilaFigurka;
if(sachovnice [x][y] == 0){
sachovnice [x][y] = bilaFigurka;
}
boolean jeBila = false;
boolean jeCerna = false;
for (int i = 0; i < sachovnice.length; i++) {
for (int j = 0; j < sachovnice[i].length; j++) {
if (sachovnice[i][j] == 1) jeBila = true;
if (sachovnice[i][j] == 2) jeCerna = true;
}
}
hraBezi = jeBila && jeCerna;
}
}
}
zatim ten code mam takle ale nevím jak na to aby mi ty zadaný tahy fungovali v poli