load_path
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user