diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/PlayerActionHandler.java | 29 | ||||
-rw-r--r-- | player/PlayerActionServer.java | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/player/PlayerActionHandler.java b/player/PlayerActionHandler.java new file mode 100644 index 0000000..05a042c --- /dev/null +++ b/player/PlayerActionHandler.java @@ -0,0 +1,29 @@ +package mahjong.player; + +import mahjong.aux.set.Hand; +import mahjong.engine.Action; + +/** + * Created by joe on 12/4/14. + */ +public abstract class PlayerActionHandler { + public Hand hand=new Hand(); + int score; + + protected String name; + + public String getName() { + return name; + } + + public abstract Action stateAlert(Action action); + public abstract void stateUpdate(Action action); + + public void setScore(int score) { + this.score = score; + } + + public int getScore() { + return score; + } +} diff --git a/player/PlayerActionServer.java b/player/PlayerActionServer.java new file mode 100644 index 0000000..49fcef4 --- /dev/null +++ b/player/PlayerActionServer.java @@ -0,0 +1,29 @@ +package mahjong.player; + +import mahjong.aux.set.Hand; +import mahjong.engine.Action; + +/** + * Created by joe on 12/4/14. + */ +public abstract class PlayerActionServer { + public Hand hand=new Hand(); + int score; + + protected String name; + + public String getName() { + return name; + } + + public abstract Action stateAlert(Action action); + public abstract void stateUpdate(Action action); + + public void setScore(int score) { + this.score = score; + } + + public int getScore() { + return score; + } +} |