feat: ajout getters

This commit is contained in:
2025-11-07 18:13:50 +01:00
parent 9c0c57e09a
commit 5bbca6047d
4 changed files with 25 additions and 25 deletions

View File

@@ -22,6 +22,8 @@ public class Map
*/
private ArrayList<Point> pathMap;
private int width, height;
/**
* Crée une nouvelle instance de Map à partir d'un tableau générique
* et d'une fonction de transformation.
@@ -108,6 +110,10 @@ public class Map
private Map(Circuit[][] map)
{
this.map = map;
this.width = map[0].length;
this.height = map.length;
boolean isPossible = this.buildPath();
if (!isPossible)
@@ -280,4 +286,14 @@ public class Map
{
return this.pathMap.size();
}
public int getWidth()
{
return this.width;
}
public int getHeight()
{
return this.height;
}
}