package fanch.multijeu.numbers.data;

public class NumberExpr extends Expression {
    protected int mValue;

    public NumberExpr(int x)
    {
        super();
        mValue=x;
    }


    @Override
    public String toString() {
        return ""+compute();
    }

    @Override
    public int compute() {
        return mValue;
    }

    @Override
    public Expression simplify() {
        return new NumberExpr(mValue);
    }

    @Override
    public Expression clone() {
        return new NumberExpr(mValue);
    }

    @Override
    public int opCount() {
        return 0;
    }
}
