package extend.mj;

import com.game.data.Score;

import java.util.ArrayList;
import java.util.List;

public class EXScore extends Score{
	public static final int WIN = 1;
	public static final int KONG = 2;
	public static final int NIAO = 3;
	public static final int PIAO_NIAO = 4;

	public List<HUScore> hu_score;

	public EXScore(EXPlayer owner){
		super(owner);
		this.hu_score = new ArrayList<>();
	}

	protected void initLog() {
		this.round_log.put(WIN, 0);
		this.round_log.put(KONG, 0);
		this.round_log.put(NIAO, 0);
		this.round_log.put(PIAO_NIAO, 0);
		if(this.hu_score!=null)
			this.hu_score.clear();
	}

	public HUScore getHuScore(EXPlayer from){
		for(HUScore hu_score : hu_score){
			if(hu_score.player.playerid == from.playerid){
				return hu_score;
			}
		}
		return null;
	}


	public static final class HUScore{
		public int score;
		public EXPlayer player;
		public int niao_score;
	}
}
