-
Notifications
You must be signed in to change notification settings - Fork 0
/
Paquet.java
44 lines (31 loc) · 874 Bytes
/
Paquet.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.util.*;
public class Paquet {
private ArrayList<Carte> cartes = new ArrayList<Carte>();
public Paquet(ArrayList<Carte> ca) {
for(int i=0;i<10;i++)
cartes.add(ca.get(i));
}
public Paquet() {
for(int i=1;i<8;i++) {
cartes.add(new Carte("Oros",i));
cartes.add(new Carte("Bastos",i));
cartes.add(new Carte("Shbadas",i));
cartes.add(new Carte("Copas",i));
}
for(int i=10;i<13;i++) {
cartes.add(new Carte("Oros",i));
cartes.add(new Carte("Bastos",i));
cartes.add(new Carte("Shbadas",i));
cartes.add(new Carte("Copas",i));
}
}
public static void main(String[] args) {
Paquet p=new Paquet();
System.out.println(p.cartes.size());
for(int i=0;i<40;i++)
System.out.println(p.cartes.get(i));
}
public ArrayList<Carte> getCartes(){
return cartes;
}
}