updated main file

This commit is contained in:
Ninja-Jambon 2024-02-21 11:58:04 +01:00
parent e0e75f3b98
commit 019c8f7ff0
3 changed files with 11 additions and 11 deletions

View file

@ -3,14 +3,15 @@
public class AppLaser {
public static void main(String [] args) {
Universe universe = new Universe(20, 10, 2, 3, 12);
int start_i = 4;
int start_j = 1;
int start_dir = 12;
Universe universe = new Universe(8, 8, start_i, start_j, start_dir);
Situation previousState, currentState = new Situation(start_i, start_j, start_dir, 0);
universe.addObstacle(4, 4);
universe.addObstacle(5, 4);
universe.addObstacle(6, 4);
universe.addObstacle(7, 4);
universe.addObstacle(8, 4);
universe.addObstacle(9, 4);
universe.print();
}

View file

@ -1,3 +1 @@
# projet-inf-1404
test

View file

@ -3,19 +3,20 @@
public class Situation {
// Atributes
private int pos_i, pos_j, nb_choix;
private int pos_i, pos_j, direction, nb_choix;
// Constructors
public Situation(int i, int j, int n) {
public Situation(int i, int j, int d, int n) {
this.pos_i = i;
this.pos_j = j;
this.direction = d;
this.nb_choix = n;
}
// Methods
public Situation copy(int n) {
return new Situation(this.pos_i, this.pos_j, n);
return new Situation(this.pos_i, this.pos_j, this.direction, n);
}
}