コード例 #1
0
 public void WriteAllMessages()
 {
     Console.SetCursorPosition(0, Building.GetTotalHeight() + 6);
     ElevatorProgram.ClearLines(Building.Elevators.Count);
     foreach (var elevator in Building.Elevators)
     {
         Console.WriteLine(elevator.Message);
     }
 }
コード例 #2
0
        public Move GetNextMove(Elevator e)
        {
            var move = ElevatorProgram.AskUserForNextMove(e);

            if (move == Move.CycleDoor)
            {
                e.Building.ResetButton(e.CurrentFloor, ElevatorState.Waiting);
            }
            return(move);
        }