package GameControl; public class CardInfo { /** * 牌型 */ private int cardType; /** * 牌内容 */ private int[] playedCards; /** * 牌的起始位置 */ private int cardLoc; /** * 出牌人 */ private int player; /** * 牌点 */ private int[] cardPoint; static public CardInfo buildCardInfo(int cardType,int[] playedCards,int cardLoc,int player){ CardInfo cardInfo = new CardInfo(); cardInfo.setCardType(cardType); cardInfo.setPlayedCards(playedCards); cardInfo.setCardLoc(cardLoc); cardInfo.setPlayer(player); return cardInfo; } static public CardInfo buildCardInfo(int cardType,int[] playedCards,int cardLoc,int player,int[] cardPoint){ CardInfo cardInfo = new CardInfo(); cardInfo.setCardType(cardType); cardInfo.setPlayedCards(playedCards); cardInfo.setCardLoc(cardLoc); cardInfo.setPlayer(player); cardInfo.setCardPoint(cardPoint); return cardInfo; } public int[] getCardPoint() { return cardPoint; } public void setCardPoint(int[] cardPoint) { this.cardPoint = cardPoint; } public int getCardType() { return cardType; } public void setCardType(int cardType) { this.cardType = cardType; } public int[] getPlayedCards() { return playedCards; } public void setPlayedCards(int[] playedCards) { this.playedCards = playedCards; } public int getCardLoc() { return cardLoc; } public void setCardLoc(int cardLoc) { this.cardLoc = cardLoc; } public int getPlayer() { return player; } public void setPlayer(int player) { this.player = player; } public boolean equals(CardInfo cardInfo){ if(this.cardType == cardInfo.getCardType() && this.cardLoc == cardInfo.getCardLoc() && this.playedCards == cardInfo.getPlayedCards() && this.player == cardInfo.getPlayer()){ return true; }else { return false; } } }