load_path

This commit is contained in:
Cyprien111
2025-04-14 08:47:57 +02:00
parent 0cd528134d
commit f5d6989d79

View File

@@ -37,13 +37,13 @@ public class GomokuGame {
int nbToken = 0;
int nbJetonsAligne = 0;
boolean renderer = false;
String path_a_load = "";
for (int i = 0; i < args.length; i++) {
switch (args[i]) {
case "--save":
if (i + 1 < args.length) {
//load(g.load(Path.of(".cache/test.dat")));
path_a_load = args[++i];
}
break;
@@ -85,7 +85,11 @@ public class GomokuGame {
}
// Test
GomokuGame g = new GomokuGame(renderer);//metre true ou fals si in veut l'affichage ou non
GomokuGame g = new GomokuGame(renderer);//metre true ou false si in veut l'affichage ou non
if(path_a_load!="")
{
g.load(Path.of(path_a_load));
}
g.renderer = new ConsoleRenderer();
g.renderer.update();
g.board.expandBoard(Cardinal.SE);