public static WaitingArea Parse(string[] input) { var grid = new WaitingArea(); grid._points = new Point[input.Length][]; for (var i = 0; i < input.Length; i++) { grid._points[i] = input[i].ToCharArray() .Select(c => new Point { IsSeat = c == 'L' }) .ToArray(); } return(grid); }
public long Part1(string[] input) { return(WaitingArea.Parse(input).PredictOccupiedSeats()); }