fCraft.InequalityDrawOperation.InequalityDrawOperation C# (CSharp) Method

InequalityDrawOperation() public method

public InequalityDrawOperation ( Player player, Command cmd ) : System
player Player
cmd Command
return System
        public InequalityDrawOperation( Player player, Command cmd )
            : base(player)
        {
            string strFunc = cmd.Next();
            if ( string.IsNullOrWhiteSpace( strFunc ) )
                throw new ArgumentException( "empty inequality expression" );
            if ( strFunc.Length < 3 )
                throw new ArgumentException( "expression is too short (should be like f(x,y,z)>g(x,y,z))" );

            strFunc = strFunc.ToLower();

            _expression = SimpleParser.Parse( strFunc, new string[] { "x", "y", "z" } );
            if ( !_expression.IsInEquality() )
                throw new ArgumentException( "the expression given is not an inequality (should be like f(x,y,z)>g(x,y,z))" );

            player.Message( "Expression parsed as " + _expression.Print() );
            string scalingStr = cmd.Next();
            _scaler = new Scaler( scalingStr );
        }