-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.java
More file actions
41 lines (34 loc) · 726 Bytes
/
Card.java
File metadata and controls
41 lines (34 loc) · 726 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
37
38
39
40
41
package prog2.tp2;
/**
* Created by Martin Gutierrez.
* User: Martin
* Date: 19/08/11
* Time: 23:01
*/
public class Card {
private int suit;
private int number;
private int value;
Card(int suit, int number, int value) {
this.suit = suit;
this.number = number;
this.value = value;
}
Card(int suit, int number) {
this.suit = suit;
this.number = number;
this.value = 0;
}
public int getSuit() {
return suit;
}
public int getNumber() {
return number;
}
public void setValue(int value) {
this.value = value;
}
public String toString() {
return getNumber() + "de" + getSuit();
}
}