Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/01/13 12:08:25 (11 years ago)
Author:
jkarder
Message:

#2069:

  • refactored grammar and symbols
  • fixed cloning and storable ctors
  • fixed plugin dependencies
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Logical Expressions/LogicalValue.cs

    r9790 r10011  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3738
    3839    [StorableConstructor]
    39     private LogicalValue(bool deserializing) : base(deserializing) { }
    40     private LogicalValue(LogicalValue original, Cloner cloner)
    41       : base(original, cloner) {
    42     }
     40    protected LogicalValue(bool deserializing) : base(deserializing) { }
     41    protected LogicalValue(LogicalValue original, Cloner cloner) : base(original, cloner) { }
    4342
    44     public LogicalValue()
    45       : base("LogicalValue", "A LogicalValue.") {
    46       this.Prefix = "";
    47       this.Suffix = "";
    48     }
     43    public LogicalValue() : base("LogicalValue", "A logical value.") { }
    4944
    5045    public override ISymbolicExpressionTreeNode CreateTreeNode() {
    51 
    5246      return new BooleanTreeNode();
    5347    }
     
    5751    }
    5852
    59     public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children) {
    60       return " " + ((BooleanTreeNode)node).Value.ToString().ToLower() + " ";
     53    public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) {
     54      return ((BooleanTreeNode)node).Value.ToString().ToLower();
    6155    }
    6256  }
Note: See TracChangeset for help on using the changeset viewer.