From 648c32564909b033b20bd3dbce904196917100e2 Mon Sep 17 00:00:00 2001 From: william Date: Sun, 9 Apr 2023 13:26:32 -0400 Subject: [PATCH] Beaucoup de changements --- .idea/workspace.xml | 57 ++++- src/main/java/laboratoire4/Action.java | 21 ++ .../java/laboratoire4/BoardEvaluator.java | 230 ------------------ src/main/java/laboratoire4/Client.java | 10 +- src/main/java/laboratoire4/GameTree.java | 12 +- src/main/java/laboratoire4/IPawn.java | 7 +- src/main/java/laboratoire4/MiniMax.java | 134 ---------- src/main/java/laboratoire4/MiniMaxResult.java | 41 ---- src/main/java/laboratoire4/MovingPawn.java | 19 -- src/main/java/laboratoire4/game/Game.java | 13 + .../java/laboratoire4/game/GameUtils.java | 38 +++ .../PusherGame.java} | 34 ++- .../SimulatedGame.java} | 54 ++-- .../java/laboratoire4/{ => pawns}/Pawn.java | 48 ++-- .../java/laboratoire4/pawns/PawnMovement.java | 31 +++ .../java/laboratoire4/pawns/PawnUtils.java | 53 ++++ .../java/laboratoire4/{ => pawns}/Pushed.java | 19 +- .../java/laboratoire4/{ => pawns}/Pusher.java | 9 +- .../laboratoire4/pawns/SimulatedPawn.java | 19 ++ .../SimulatedPushed.java} | 23 +- .../SimulatedPusher.java} | 23 +- .../strategies/AttackStrategy.java | 68 ++++++ .../strategies/DefenseStrategy.java | 93 +++++++ .../strategies/EvaluationResult.java | 27 ++ .../strategies/ImmediateDefenseStrategy.java | 61 +++++ .../strategies/MasterStrategy.java | 77 ++++++ .../strategies/MiniMaxStrategy.java | 123 ++++++++++ .../strategies/StartingStrategy.java | 50 ++++ .../laboratoire4/strategies/Strategy.java | 40 +++ .../strategies/WinningStrategy.java | 51 ++++ 30 files changed, 948 insertions(+), 537 deletions(-) create mode 100644 src/main/java/laboratoire4/Action.java delete mode 100644 src/main/java/laboratoire4/BoardEvaluator.java delete mode 100644 src/main/java/laboratoire4/MiniMax.java delete mode 100644 src/main/java/laboratoire4/MiniMaxResult.java delete mode 100644 src/main/java/laboratoire4/MovingPawn.java create mode 100644 src/main/java/laboratoire4/game/Game.java create mode 100644 src/main/java/laboratoire4/game/GameUtils.java rename src/main/java/laboratoire4/{PusherBoard.java => game/PusherGame.java} (74%) rename src/main/java/laboratoire4/{MovingBoard.java => game/SimulatedGame.java} (53%) rename src/main/java/laboratoire4/{ => pawns}/Pawn.java (59%) create mode 100644 src/main/java/laboratoire4/pawns/PawnMovement.java create mode 100644 src/main/java/laboratoire4/pawns/PawnUtils.java rename src/main/java/laboratoire4/{ => pawns}/Pushed.java (58%) rename src/main/java/laboratoire4/{ => pawns}/Pusher.java (74%) create mode 100644 src/main/java/laboratoire4/pawns/SimulatedPawn.java rename src/main/java/laboratoire4/{MovingPushed.java => pawns/SimulatedPushed.java} (55%) rename src/main/java/laboratoire4/{MovingPusher.java => pawns/SimulatedPusher.java} (55%) create mode 100644 src/main/java/laboratoire4/strategies/AttackStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/DefenseStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/EvaluationResult.java create mode 100644 src/main/java/laboratoire4/strategies/ImmediateDefenseStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/MasterStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/MiniMaxStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/StartingStrategy.java create mode 100644 src/main/java/laboratoire4/strategies/Strategy.java create mode 100644 src/main/java/laboratoire4/strategies/WinningStrategy.java diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8fa8e54..3e38ebe 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,15 +4,36 @@