public void StartBattle() { var lines = Input.TrimEnd() .Split(new[] { "\r\n" }, StringSplitOptions.None); var sb = new StringBuilder(); try { var arena = _arenaParser.Parse(lines); var positions = arena.RunBattle(); foreach (var position in positions) { sb.AppendLine(position.ToString()); } } catch (Exception e) { sb.Append(e.Message); } Results = sb.ToString(); }
protected override void Because() { _exception = Catch.Exception(() => _arena = _arenaParser.Parse(_lines)); }