This commit is contained in:
2023-04-27 11:27:11 +02:00
parent bfcbd64735
commit 93c00d1ed0
24 changed files with 483 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import java.awt.*;
import javax.swing.*;
import java.util.*;
public class PiecePipee implements ObjetAleatoire {
private int faceVisible; // 0 = pile; 1 = face.
public PiecePipee(){
this.faceVisible=faceVisible;
}
public void lancer(){
Random r = new Random();
if(r.nextInt()%10<7&&r.nextInt()%10>-7){
this.faceVisible=0;
}else{
this.faceVisible=1;
}
}
public int lire(){
return faceVisible;
}
}