public class Player {
    public static final int HUMAN = 0;
    public static final int ROBOT = 1;
    private int type; // Possible values: HUMAN or ROBOT;
    private String name;
    public Player(int type) {
        this.type = type;
    }
    public Player(int type, String name) {
        this(type);
        this.name = name;
    }
    public boolean isHuman() {
        return this.type == HUMAN;
    }
    public Hand formHand() {
        switch (type) {
            case HUMAN:
                return Hand.askHand();
            case ROBOT:
            default:
                return new Hand();
                // Equivalent to:
                // return Hand.randomHand();
        }
    }
    @Override
    public String toString() {
        return name;
    }
}
