This commit is contained in:
Aubin DORIVAL
2025-04-14 09:05:30 +02:00

View File

@@ -42,12 +42,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;
@@ -86,8 +87,6 @@ public class GomokuGame {
break;
}
}
// Test
GomokuGame g = new GomokuGame(false);// metre true ou fals si in veut l'affichage ou non
System.out.println(g.board);
// g.renderer.update();
@@ -101,6 +100,29 @@ public class GomokuGame {
* @param bot If the player want to play with a bot it's true.
* @param name1 Name of player one.
* @param name2 Name of player two.
* =======
*
* // Test
* 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.newGame(false, "Player 1", "Player 2", DEFAULT_TOKENS_COUNT);
* g.renderer = new ConsoleRenderer();
* g.renderer.init(g);
* g.board.expandBoard(Cardinal.SE);
* g.renderer.update();
*
* }
*
* /**
* This method init the game with these parameters.
* @param bot If the player want to play with a bot it's true.
* @param name1 Name of player one.
* @param name2 Name of player two.
* >>>>>>> 0b7eea162d3fc3a376c81c37a86ec6fc47ae4493
* @param tokens Number of tokens for each player.
*/