public void createVar(string name, LOLType type, string value)
 {
     variableList.Add (name, new lolValue (type, value));
     MainClass.win.refreshSymbol(this);
 }
 public void setValue(lolValue lv)
 {
     type = lv.getType();
     value = lv.getValue();
 }
 public void setValue(LOLType t, string v)
 {
     type = t;
     value = v;
 }
 public void setVar(string name, LOLType type, string value)
 {
     variableList [name].setValue(type, value);
     MainClass.win.refreshSymbol(this);
 }
 public lolValue(LOLType t, string v)
 {
     type = t;
     value = v;
 }
 private Tuple<LOLType, string> createValue(LOLType type, string value)
 {
     return new Tuple<LOLType, string> (type, value);
 }
 lolValue implicitCast(lolValue lv, LOLType toType)
 {
     if(lv.getType() == LOLType.NOOB && toType != LOLType.TROOF) {
         setError("Cannot implicitly cast NOOB to any type except TROOF");
         return null;
     }
     return cast(lv, toType);
 }
 lolValue cast(lolValue lv, LOLType toType)
 {
     string newValue = "";
     switch(toType) {	//the type to be casted to
         case LOLType.NOOB:
             break;
         case LOLType.NUMBAR:
             switch (lv.getType()) {		//getting the original type
                 case LOLType.NOOB:
                     newValue = "0";
                     break;
                 case LOLType.NUMBAR:
                     newValue = lv.getValue();
                     break;
                 case LOLType.NUMBR:
                     newValue = lv.getValue();
                     break;
                 case LOLType.TROOF:
                     newValue = lv.getValue() == "FAIL"? "0": "1";
                     break;
                 case LOLType.YARN:
                     decimal dec;
                     if(decimal.TryParse(lv.getValue().ToString(), out dec) == true)
                         newValue = decimal.Parse(lv.getValue()).ToString();
                     else setError("Unable to cast value");
                     break;
             }
             break;
         case LOLType.NUMBR:
             switch (lv.getType()) {		//getting the original type
                 case LOLType.NOOB:
                     newValue = "0";
                     break;
                 case LOLType.NUMBAR:
                     newValue = Math.Floor(decimal.Parse(lv.getValue())).ToString();
                     break;
                 case LOLType.NUMBR:
                     newValue = lv.getValue();
                     break;
                 case LOLType.TROOF:
                     newValue = lv.getValue() == "FAIL"? "0": "1";
                     break;
                 case LOLType.YARN:
                     decimal dec;
                     if (decimal.TryParse (lv.getValue ().ToString (), out dec) == true) {
                         newValue = Math.Floor(decimal.Parse (lv.getValue ())).ToString();
                     }
                     else setError("Unable to cast value");
                     break;
             }
             break;
         case LOLType.TROOF:
             switch (lv.getType()) {		//getting the original type
                 case LOLType.NOOB:
                     newValue = "FAIL";
                     break;
                 case LOLType.NUMBAR:
                     newValue = decimal.Parse(lv.getValue()) != 0? "WIN": "FAIL";
                     break;
                 case LOLType.NUMBR:
                     newValue = int.Parse(lv.getValue()) != 0? "WIN": "FAIL";
                     break;
                 case LOLType.TROOF:
                     newValue = lv.getValue();
                     break;
                 case LOLType.YARN:
                     newValue = lv.getValue().Length != 0? "WIN": "FAIL";
                     break;
             }
             break;
         case LOLType.YARN:
             newValue = lv.getValue();
             break;
     }
     return new lolValue(toType, newValue);
 }
 public new void setValue(LOLType t, string v)
 {
     base.setValue (t, v);
     variableTable.setVar ("IT", t, v);
 }
 public LolIt(LOLType t, string v, SymbolTable st)
     : base(t, v)
 {
     variableTable = st;
 }