projet-court-programmation-.../allumettes/Tricheur.java
2023-06-20 21:05:21 +02:00

14 lines
372 B
Java

package allumettes;
public class Tricheur implements Strategie {
@Override
public int nbPrise(Jeu game, String nom) throws CoupInvalideException {
System.out.println("[Je triche...]");
game.retirer(game.getNombreAllumettes() - 2);
System.out.format("[Allumettes restantes : %d]\n", game.getNombreAllumettes());
return 1;
}
}