projet-court-programmation-.../allumettes/Tricheur.java

14 lines
372 B
Java
Raw Permalink Normal View History

2023-06-20 19:05:21 +00:00
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;
}
}