anchor.diff:      var input = readInput('day6');
       var strings = input.split('\n');
       print('Part one: ${partOne(strings)}');
  -    // print('Part two: ${partTwo(strings)}');
  +    print('Part two: ${partTwo(strings)}');
     } on FileSystemException catch (e) {
       print('Error reading input from file: $e');
     } catch (e) {
  
positive.code: 
  /// Returns the number of lights that are lit after following all the
  /// [instructions].
  int partOne(List<String> instructions) {
    var lights = new List<List<bool>>.generate(1000, (_) =>
        new List<bool>.filled(1000, false));
    var task;
    var startX, startY;
    var endX, endY;
    var match;
    var lit = 0;
  
    RegExp exp = new RegExp(r'(turn \w+|toggle) (\d+),(\d+) through (\d+),(\d+)');
  
  
negative.code: 
      for (var x = startX; x <= endX; x++) {
        for (var y = startY; y <= endY; y++) {
          change = doTask(task, lights, x, y);
          result += result == 0 && change < 0 ? 0 : change;
        }
      }
    }
  
    return result;
  }
  
  /// Returns the result of executing the [task] to change the light in [lights]
  /// at row [x] and column [y].
  int _doTaskOne(String task, List<List<bool>> lights, int x, int y) {
    var result = 0;
  
    switch (task) {
      case 'turn on':
        if (!lights[x][y]) result++;
        lights[x][y] = true;
        break;
      case 'turn off':
        if (lights[x][y]) result--;
        lights[x][y] = false;
        break;
      case 'toggle':
        result += lights[x][y] ? -1 : 1;
        lights[x][y] = !lights[x][y];
        break;
    }
  
    return result;
  }
  
  /// Returns the result of executing the [task] to change the light in [lights]
  /// at row [x] and column [y].
  int _doTaskTwo(String task, List<List<int>> lights, int x, int y) {
    switch (task) {
      case 'turn on':
        lights[x][y]++;
        return 1;
      case 'turn off':
        if (lights[x][y] > 0) {
          lights[x][y]--;
          return -1;
        }
        break;
      case 'toggle':
        lights[x][y] += 2;
        return 2;
    }
  
    return 0;
  }
  