summaryrefslogtreecommitdiff
path: root/aux/set
diff options
context:
space:
mode:
authorJoe Zhao <ztuowen@gmail.com>2014-12-06 19:48:28 +0800
committerJoe Zhao <ztuowen@gmail.com>2014-12-06 19:48:28 +0800
commit96bc701ba7a01b940ad5910d85c7b6958ac4a141 (patch)
treeabc759e4486284bb50b91d105b8611660db9eb4f /aux/set
parentc0825e62c58cd76d3f2b9c34637ee37a21de222a (diff)
downloadMahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.tar.gz
Mahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.tar.bz2
Mahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.zip
Restructuring & workflow construction
Diffstat (limited to 'aux/set')
-rw-r--r--aux/set/Hand.java10
-rw-r--r--aux/set/Meld.java (renamed from aux/set/Aside.java)6
2 files changed, 8 insertions, 8 deletions
diff --git a/aux/set/Hand.java b/aux/set/Hand.java
index a66944f..a865a90 100644
--- a/aux/set/Hand.java
+++ b/aux/set/Hand.java
@@ -23,19 +23,19 @@ public class Hand extends Set {
super(cards);
}
- public Vector<Aside> asides = new Vector<Aside>();
+ public Vector<Meld> melds = new Vector<Meld>();
public void init()
{
cards.clear();
- asides.clear();
+ melds.clear();
}
public boolean huAble(Card card)
{
boolean hu=false;
accountant.add(card,1);
- if (accountant.calTing(asides.size())==0)
+ if (accountant.calTing(melds.size())==0)
hu=true;
accountant.add(card,-1);
return hu;
@@ -69,8 +69,8 @@ public class Hand extends Set {
public boolean jiaGangAble(Card card)
{
- for (Aside i:asides)
- if (i.getType()== Aside.Type.Peng && card.getStdId() == i.getRep()[0].getStdId())
+ for (Meld i:melds)
+ if (i.getType()== Meld.Type.Peng && card.getStdId() == i.getRep()[0].getStdId())
return true;
return false;
}
diff --git a/aux/set/Aside.java b/aux/set/Meld.java
index 2a3b530..8da091b 100644
--- a/aux/set/Aside.java
+++ b/aux/set/Meld.java
@@ -6,21 +6,21 @@ import mahjong.player.GenericPlayer;
/**
* Created by joe on 12/2/14.
*/
-public class Aside {
+public class Meld {
public enum Type {Chi,Peng,aGang,mGang,jGang};
private Type type;
private Card[] rep;
private int from;
- public Aside(Card[] rep,Type type,int from)
+ public Meld(Card[] rep,Type type,int from)
{
this.rep=rep;
this.type=type;
this.from=from;
}
- public Aside(Card[] rep,Type type)
+ public Meld(Card[] rep,Type type)
{
this.rep=rep;
this.type=type;