mirror of
https://github.com/guezoloic/L3-racing-game.git
synced 2026-03-28 19:13:41 +00:00
feat(Map.java): ajout buildPath function
This commit is contained in:
14
src/Map.java
14
src/Map.java
@@ -9,6 +9,20 @@ public class Map
|
||||
public Map(Circuit[][] map)
|
||||
{
|
||||
this.map = map;
|
||||
this.buildPath();
|
||||
}
|
||||
|
||||
private boolean buildPath()
|
||||
{
|
||||
Point[] p = bindPath();
|
||||
|
||||
if (p == null)
|
||||
return false;
|
||||
|
||||
Point start = p[0];
|
||||
Point end = p[0];
|
||||
|
||||
return followPath(start, end);
|
||||
}
|
||||
|
||||
private Point[] bindPath()
|
||||
|
||||
Reference in New Issue
Block a user