-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProvaMazzo.java
More file actions
36 lines (29 loc) · 845 Bytes
/
ProvaMazzo.java
File metadata and controls
36 lines (29 loc) · 845 Bytes
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
public class ProvaMazzo{
public static void main(String[] args){
Mazzo mazzo = new Mazzo();
mazzo.stampaMazzo(true);
try{
Carta c2 = new Carta(4, 1);
System.out.println("----------------------------");
System.out.println(mazzo.cerca(c2));
}catch(CartaNonValidaEcc e){}
try{
Carta c3 = new Carta(4, 3);
System.out.println("-----------INSERISCI---------");
mazzo.inserisci(c3, 5);
mazzo.stampaMazzo(false);
}catch(CartaNonValidaEcc e){
System.out.println(e.getMessage());
}
mazzo.stampaMazzo(true);
System.out.println("-----------ESTRAI---------");
mazzo.estrai(3);
mazzo.stampaMazzo(true);
try{
Carta c3 = new Carta(4, 1);
System.out.println("-----------INSERISCI---------");
mazzo.inserisci(c3);//, 5);
mazzo.stampaMazzo(true);
}catch(CartaNonValidaEcc e){}
}
}