Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Card {
- private int value;
- private String shape;
- public Card(int value, String shape) {
- this.value = value;
- this.shape = shape;
- }
- private int getValue() {
- return value;
- }
- public String getShape() {
- return shape;
- }
- public boolean equalValue(int num) {
- if(this.value == num)
- return true;
- else
- return false;
- }
- public boolean isSameCard(Card card) {
- if(this.shape.equals(card.getShape()))
- return true;
- else
- return false;
- }
- }
Add Comment
Please, Sign In to add comment