예제 #1
0
        public Ferry(Ferry ferry)
        {
            WaitingArea = new SeatState[ferry.WaitingArea.GetLength(0),
                                        ferry.WaitingArea.GetLength(1)];

            for (var x = 0; x < this.WaitingArea.GetLength(0); x++)
            {
                for (var y = 0; y < this.WaitingArea.GetLength(1); y++)
                {
                    this[x, y] = ferry[x, y];
                }
            }
        }
예제 #2
0
        public bool IsTheSame(Ferry ferry)
        {
            for (var x = 0; x < ferry.WaitingArea.GetLength(0); x++)
            {
                for (var y = 0; y < ferry.WaitingArea.GetLength(1); y++)
                {
                    if (ferry[x, y] != this[x, y])
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }