summaryrefslogtreecommitdiff
path: root/engine/Action.java
blob: 3009fa0e351e3026c9cfd3a6f7542b7dcb2eefe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package mahjong.engine;

/**
 * Created by joe on 12/3/14.
 */
public class Action {
    // TODO Generic action
    // Requirement: printable,parseable,coverage
    // Coverage: System,player
    public enum Type {System,Player};
    // System info merely reflect system state
    // Player info pertaining to players;
    public enum Place {Info,East,South,West,North};
    public enum Act {Info,CardDraw,CardPut,Aside};

    Type type;
    Act act;
    Place place;
    String message;

    public Type getType() {
        return type;
    }

    public Action(Type type,Place place,Act act,String message)
    {
        this.type = type;
        this.place = place;
        this.act = act;
        this.message = message;
    }
    public Action(String str)
    {
    }

    @Override
    public String toString() {
        return super.toString();
    }
}