14 lines
372 B
Java
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;
|
||
|
}
|
||
|
|
||
|
}
|