MISE A JOUR

This commit is contained in:
HP_pellel
2025-09-07 14:44:32 +02:00
parent 117a58acbc
commit 564aceb193
22 changed files with 507 additions and 123 deletions
+11 -6
View File
@@ -1,11 +1,10 @@
package modele;
import modele.piece.Piece;
import modele.joueur.*;
import java.util.List;
import java.awt.Point;
import java.util.ArrayList;
import java.util.List;
import modele.joueur.*;
import modele.piece.Piece;
public class Partie{
private Plateau plateau;
@@ -20,8 +19,8 @@ public class Partie{
private List<Piece> listeCapturesBlancs;
private List<Piece> listeCapturesNoires;
public Partie(Joueur joueurBlanc, Joueur joueurNoir) {
plateau = new Plateau();
public Partie(Joueur joueurBlanc, Joueur joueurNoir, String stylePlateau) {
plateau = new Plateau(stylePlateau);
nombreCoups = 0;
historique = new ArrayList<>();
listeCapturesBlancs = new ArrayList<>();
@@ -118,6 +117,12 @@ public class Partie{
public List<Coup> getHistorique() {
return historique;
}
public Coup getDernierCoup() {
if(this.historique.isEmpty()) {
return null;
}
return this.historique.get(this.historique.size() - 1);
}
public int getNombreCoups() {
return nombreCoups;