constructeurs pour classes abstrraites

This commit is contained in:
2025-10-09 11:34:16 +02:00
parent c3c4609d62
commit d4667481c6
4 changed files with 22 additions and 2 deletions

View File

@@ -32,8 +32,11 @@ public abstract class AbstractGame {
// a map from the enum Player to the genuine Player AbstractGamePlayer
private EnumMap<Player, AbstractGamePlayer> mapPlayers;
//NB. pas de constructeur possible on est abstrait, il faut faire une usine abstraite.
// constructeur à appeler dans le constructeur d'un fils concret avec super.
public AbstractGame(IBoard b, EnumMap<Player,AbstractGamePlayer> m){
this.currentBoard=b;
this.mapPlayers=m;
}
/**
* boucle de contrôle du jeu.