legitbugfix #19
BIN
build/fr/iut_fbleau/HexGame/Arena.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/Arena.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/ArenaMain.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/ArenaMain.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HeuristicBot.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HeuristicBot.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexBoard.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexBoard.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexFrame.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexFrame.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexMain$1.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexMain$1.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexMain.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexMain.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexPanel$1.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexPanel$1.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexPanel.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexPanel.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexPly.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexPly.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexSimMain$Args.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexSimMain$Args.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexSimMain$Stats.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexSimMain$Stats.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HexSimMain.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HexSimMain.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/HumanConsolePlayer.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/HumanConsolePlayer.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/MiniMaxBot.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/MiniMaxBot.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/MonteCarloBot.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/MonteCarloBot.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/RandomBot.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/RandomBot.class
Normal file
Binary file not shown.
BIN
build/fr/iut_fbleau/HexGame/Simulation.class
Normal file
BIN
build/fr/iut_fbleau/HexGame/Simulation.class
Normal file
Binary file not shown.
0
javaAPI/arena_results.csv
Normal file
0
javaAPI/arena_results.csv
Normal file
|
|
@@ -1,7 +1,6 @@
|
|||||||
package fr.iut_fbleau.HexGame;
|
package fr.iut_fbleau.HexGame;
|
||||||
|
|
||||||
import fr.iut_fbleau.GameAPI.*;
|
import fr.iut_fbleau.GameAPI.*;
|
||||||
|
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
@@ -11,7 +10,7 @@ import java.util.Scanner;
|
|||||||
public class HexMain {
|
public class HexMain {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
int size = 11;
|
int size = 7;
|
||||||
if (args.length >= 1) {
|
if (args.length >= 1) {
|
||||||
try { size = Integer.parseInt(args[0]); } catch (NumberFormatException ignored) {}
|
try { size = Integer.parseInt(args[0]); } catch (NumberFormatException ignored) {}
|
||||||
}
|
}
|
||||||
@@ -19,12 +18,19 @@ public class HexMain {
|
|||||||
HexBoard board = new HexBoard(size);
|
HexBoard board = new HexBoard(size);
|
||||||
|
|
||||||
Scanner sc = new Scanner(System.in);
|
Scanner sc = new Scanner(System.in);
|
||||||
|
Result res;
|
||||||
EnumMap<Player, AbstractGamePlayer> players = new EnumMap<>(Player.class);
|
EnumMap<Player, AbstractGamePlayer> players = new EnumMap<>(Player.class);
|
||||||
players.put(Player.PLAYER1, new HumanConsolePlayer(Player.PLAYER1, sc));
|
players.put(Player.PLAYER1, new HumanConsolePlayer(Player.PLAYER1, sc));
|
||||||
players.put(Player.PLAYER2, new HumanConsolePlayer(Player.PLAYER2, sc));
|
players.put(Player.PLAYER2, new HumanConsolePlayer(Player.PLAYER2, sc));
|
||||||
|
|
||||||
AbstractGame game = new AbstractGame(board, players) {};
|
|
||||||
Result res = game.run();
|
if (args.length>=2 && args[1].equals("autoplay")) {
|
||||||
|
Simulation sim = new Simulation(board, players);
|
||||||
|
res = sim.run();
|
||||||
|
} else {
|
||||||
|
AbstractGame game = new AbstractGame(board, players) {};
|
||||||
|
res = game.run();
|
||||||
|
}
|
||||||
|
|
||||||
System.out.println(board);
|
System.out.println(board);
|
||||||
System.out.println("Résultat (du point de vue de PLAYER1) : " + res);
|
System.out.println("Résultat (du point de vue de PLAYER1) : " + res);
|
||||||
|
|||||||
Reference in New Issue
Block a user