Controle machine
This commit is contained in:
16
DEV2.1/CM1/02_Exquis/Exquis.java
Normal file
16
DEV2.1/CM1/02_Exquis/Exquis.java
Normal file
@@ -0,0 +1,16 @@
|
||||
import java.awt.*;
|
||||
import java.util.Random;
|
||||
|
||||
public class Exquis {
|
||||
|
||||
private String[] chaines;
|
||||
|
||||
public Exquis(String[] chaines) {
|
||||
this.chaines = chaines;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Random aleatoire = new Random();
|
||||
return this.chaines[Math.abs(aleatoire.nextInt()) % this.chaines.length];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user