Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }