Exemple #1
0
        private Rover SpinTo(Spin to)
        {
            if (to.Equals(Spin.L))
            {
                _position.Direction = _position.Direction.OnLeft();
            }
            else if (to.Equals(Spin.R))
            {
                _position.Direction = _position.Direction.OnRight();
            }

            return(this);
        }
        public void Equal()
        {
            var spin1 = new Spin(10);
            var spin2 = new Spin(10);

            Assert.Equal(spin1, spin2);
            Assert.True(spin1 == spin2);
            Assert.True(spin1.Equals(spin2));
            Assert.False(spin1 != spin2);
        }