diff --git a/AppLaser.java b/AppLaser.java index b98606d..bc19d77 100644 --- a/AppLaser.java +++ b/AppLaser.java @@ -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(); } diff --git a/README.md b/README.md index ffba760..befe2aa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ # projet-inf-1404 - -test \ No newline at end of file diff --git a/Situation.java b/Situation.java index e048ece..9b8e80c 100644 --- a/Situation.java +++ b/Situation.java @@ -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); } }