From c0825e62c58cd76d3f2b9c34637ee37a21de222a Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Fri, 5 Dec 2014 20:07:14 +0800 Subject: Restructuring --- aux/set/CardSet.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'aux/set/CardSet.java') diff --git a/aux/set/CardSet.java b/aux/set/CardSet.java index 56a998d..edea88a 100644 --- a/aux/set/CardSet.java +++ b/aux/set/CardSet.java @@ -72,6 +72,25 @@ public class CardSet { { //cnt=0; int res=calTing(0,cardRem[0],0,0,mian); + + // 7 pairs + int pairs=0; + for (int i:cardRem) + if (i>0) ++pairs; + res = Math.min(7 - pairs, res); + + // Musou + int types=0; + pairs=0; + for (int i=0;i0) + ++pairs; + } + res = Math.min(14-(((pairs>0)?1:0)+types),res); + //System.out.println(cnt); return res; } -- cgit v1.2.3-70-g09d2