Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/01/13 16:39:35 (11 years ago)
Author:
jkarder
Message:

#2069:

  • refactored grammar and symbols
  • changed RobocodeProblem to use the ProbabilisticTreeCreator by default
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Statements/IfStat.cs

    r10011 r10014  
    4343
    4444    public IfStat()
    45       : base("IfStatement", "An if statement.") {
     45      : base("IfStat", "An if statement.") {
    4646      Prefix = "if (";
    47       Suffix = ")";
     47      Suffix = ") {";
    4848    }
    4949
     
    6363        else throw new ArgumentException("Unexpected children.", "children");
    6464      }
    65       return Prefix + condition + Suffix + Environment.NewLine + ifTrue + Environment.NewLine + ifElse + Environment.NewLine;
     65      string result = Prefix + condition + Suffix + Environment.NewLine + ifTrue + Environment.NewLine + "}";
     66      result += string.IsNullOrEmpty(ifElse) ? Environment.NewLine : ifElse;
     67      return result;
    6668    }
    6769  }
Note: See TracChangeset for help on using the changeset viewer.