summaryrefslogtreecommitdiff
path: root/aux/set/Meld.java
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/Meld.java
parentc0825e62c58cd76d3f2b9c34637ee37a21de222a (diff)
downloadMahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.tar.gz
Mahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.tar.bz2
Mahjong-96bc701ba7a01b940ad5910d85c7b6958ac4a141.zip
Restructuring & workflow construction
Diffstat (limited to 'aux/set/Meld.java')
-rw-r--r--aux/set/Meld.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/aux/set/Meld.java b/aux/set/Meld.java
new file mode 100644
index 0000000..8da091b
--- /dev/null
+++ b/aux/set/Meld.java
@@ -0,0 +1,45 @@
+package mahjong.aux.set;
+
+import mahjong.aux.Card;
+import mahjong.player.GenericPlayer;
+
+/**
+ * Created by joe on 12/2/14.
+ */
+public class Meld {
+ public enum Type {Chi,Peng,aGang,mGang,jGang};
+
+ private Type type;
+ private Card[] rep;
+ private int from;
+
+ public Meld(Card[] rep,Type type,int from)
+ {
+ this.rep=rep;
+ this.type=type;
+ this.from=from;
+ }
+
+ public Meld(Card[] rep,Type type)
+ {
+ this.rep=rep;
+ this.type=type;
+ this.from= 0;
+ }
+
+ public Card[] getRep() {
+ return rep;
+ }
+
+ public int getFrom() {
+ return from;
+ }
+
+ public Type getType() {
+ return type;
+ }
+
+ public void setFrom(int from) {
+ this.from = from;
+ }
+}