feat: enlever Circuit.java et toute ses impl

This commit is contained in:
2025-10-29 16:41:03 +01:00
parent f7677fec3b
commit 9ab1d6b960
3 changed files with 6 additions and 14 deletions

View File

@@ -3,10 +3,10 @@ import java.util.ArrayList;
public class Map
{
private Circuit[][] map;
private CircuitCell[][] map;
private ArrayList<Point> pathMap;
public Map(Circuit[][] map)
private Map(CircuitCell[][] map)
{
this.map = map;
boolean isPossible = this.buildPath();
@@ -41,7 +41,7 @@ public class Map
{
for (int j = 0; j < map.length; j++)
{
switch (map[i][j].getType())
switch (map[i][j])
{
case CircuitCell.START:
if (start == null) start = new Point(j, i);
@@ -100,7 +100,7 @@ public class Map
if (next.equals(previous))
continue;
CircuitCell type = map[y][x].getType();
CircuitCell type = map[y][x];
if ((type == CircuitCell.ROAD || type == CircuitCell.YROAD) ||
(type == CircuitCell.FINISH && map[current.y][current.x] == CircuitCell.ROAD))
{
@@ -119,7 +119,7 @@ public class Map
return false;
}
public Circuit getElement(int x, int y)
public CircuitCell getElement(int x, int y)
{
return map[y][x];
}