summaryrefslogtreecommitdiff
path: root/aux
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2014-12-03 13:05:53 +0800
committerJoe Zhao <ztuowen@gmail.com>2014-12-03 13:05:53 +0800
commit635589583b9af8994dd3f947dd3eb31157ecde1f (patch)
treed4f1fc0c7d8483bf6b21e6c5139dea0adb9db4c4 /aux
parent20192ee5e02f3b87992764b68063028cb15e9d50 (diff)
downloadMahjong-635589583b9af8994dd3f947dd3eb31157ecde1f.tar.gz
Mahjong-635589583b9af8994dd3f947dd3eb31157ecde1f.tar.bz2
Mahjong-635589583b9af8994dd3f947dd3eb31157ecde1f.zip
Revised Aside
Need better input method
Diffstat (limited to 'aux')
-rw-r--r--aux/set/Aside.java8
-rw-r--r--aux/set/Hand.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/aux/set/Aside.java b/aux/set/Aside.java
index c58932c..2a3b530 100644
--- a/aux/set/Aside.java
+++ b/aux/set/Aside.java
@@ -10,24 +10,24 @@ public class Aside {
public enum Type {Chi,Peng,aGang,mGang,jGang};
private Type type;
- private Card rep;
+ private Card[] rep;
private int from;
- public Aside(Card rep,Type type,int from)
+ public Aside(Card[] rep,Type type,int from)
{
this.rep=rep;
this.type=type;
this.from=from;
}
- public Aside(Card rep,Type type)
+ public Aside(Card[] rep,Type type)
{
this.rep=rep;
this.type=type;
this.from= 0;
}
- public Card getRep() {
+ public Card[] getRep() {
return rep;
}
diff --git a/aux/set/Hand.java b/aux/set/Hand.java
index cf5767e..a66944f 100644
--- a/aux/set/Hand.java
+++ b/aux/set/Hand.java
@@ -70,7 +70,7 @@ public class Hand extends Set {
public boolean jiaGangAble(Card card)
{
for (Aside i:asides)
- if (i.getType()== Aside.Type.Peng && card.getStdId() == i.getRep().getStdId())
+ if (i.getType()== Aside.Type.Peng && card.getStdId() == i.getRep()[0].getStdId())
return true;
return false;
}