Controle machine

This commit is contained in:
Simoes Lukas
2025-03-19 10:18:41 +01:00
parent 42cc204dea
commit 376861b608
86 changed files with 803 additions and 179 deletions

Binary file not shown.

View File

@@ -0,0 +1,23 @@
import java.awt.*;
public class Configuration {
private String[][] grille;
public Configuration() {
String[][] temp = {
{" ", " ", " "},
{" ", " ", " "},
{" ", " ", " "}
};
this.grille = temp;
}
public boolean estLibre(int x, int y) {
return this.grille[x][y].equals(" ");
}
public void jouer(int x, int y, String joueur) {
this.grille[x][y] = joueur;
}
}

Binary file not shown.

View File

@@ -0,0 +1,8 @@
public class Main {
public static void main(String[] args) {
Configuration test = new Configuration();
System.out.println(test.estLibre(1, 1) + "");
test.jouer(1, 1, "X");
System.out.println(test.estLibre(1, 1) + "");
}
}