private (int rowNumber, int columnNumber) ConvertSeatCodeToSeatPosition() { var frontBackPartition = SeatCode.Substring(0, 7); var leftRightPartition = SeatCode.Substring(7); var rowNumber = ConvertFrontPackPartitionToRowNumber(frontBackPartition); var columnNumber = ConvertLeftRightPartitionToColumnNumber(leftRightPartition); return(rowNumber, columnNumber); }
private string ConvertSeatItemToString() { var frontBackPartition = SeatCode.Substring(0, 7); var leftRightPartition = SeatCode.Substring(7); var outputString = ""; foreach (var character in frontBackPartition) { var charToConcat = character == 'F' ? "▓" : "░"; outputString += charToConcat; } outputString += ' '; foreach (var character in leftRightPartition) { var charToConcat = character == 'L' ? "▓" : "░"; outputString += charToConcat; } outputString += $" {SeatId}"; return(outputString); }