本文实例为大家分享了java实现斗地主发牌过程的具体代码,供大家参考,具体内容如下
一、牌类实现
定义牌的相关属性,点数、花色、大小
package com.softeem.lesson18.doudizhu;
import java.util.Objects;
public class Card {
//牌面值
private String name;
//花色
private String flower;
//点数
private int num;
public Card() {
// TODO Auto-generated constructor stub
}
public Card(String name, String flower, int num) {
super();
this.name = name;
this.flower = flower;
this.num = num;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFlower() {
return flower;
}
public void setFlower(String flower) {
this.flo