diff options
author | Joe Zhao <ztuowen@gmail.com> | 2014-12-05 20:07:14 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2014-12-05 20:07:14 +0800 |
commit | c0825e62c58cd76d3f2b9c34637ee37a21de222a (patch) | |
tree | 08b83388fcce650eada0bc1a627c88df4aa999c1 /player/PlayerActionHandler.java | |
parent | 0d3a0f0ca6c038ba931edbde87bd21db9397327b (diff) | |
download | Mahjong-c0825e62c58cd76d3f2b9c34637ee37a21de222a.tar.gz Mahjong-c0825e62c58cd76d3f2b9c34637ee37a21de222a.tar.bz2 Mahjong-c0825e62c58cd76d3f2b9c34637ee37a21de222a.zip |
Restructuring
Diffstat (limited to 'player/PlayerActionHandler.java')
-rw-r--r-- | player/PlayerActionHandler.java | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/player/PlayerActionHandler.java b/player/PlayerActionHandler.java index 05a042c..26ba7e3 100644 --- a/player/PlayerActionHandler.java +++ b/player/PlayerActionHandler.java @@ -6,24 +6,7 @@ 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; - } +public interface PlayerActionHandler { + public abstract Action stateAlert(Action action); // Player action required or not, state will not change + public abstract void stateUpdate(Action action); // Player action taken, changing state. } |