public override void SetLaneDirection(ImmovableObject i)
 {
     base.SetLaneDirection(i);
     if (_lane == Up)
     {
         Down.CanBePlaced = false;
     }
     else
     {
         Up.CanBePlaced = false;
     }
 }
        public void TestRespondToInteraction()
        {
            Position position = new Position(-31, 20);

            GameObject immovableObject = new ImmovableObject(position, '7');

            immovableObject.RespondToInteraction();

            bool actual = immovableObject.IsDestroyed;
            bool expected = false;

            Assert.AreEqual(expected, actual);
        }
        public void TestUpdatePosition()
        {
            Position originalPosition = new Position(24, 71);

            GameObject immovableObject = new ImmovableObject(originalPosition, '9');

            Position vectorChange = new Position(13, -7);

            immovableObject.UpdatePosition(vectorChange);

            Position actual = immovableObject.Position;
            Position expected = originalPosition;

            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
 public virtual void SetLaneDirection(ImmovableObject i) => Lane = i;
 public ImmovableEventArgs(ImmovableObject coin)
 {
     Coin = coin;
 }
Beispiel #6
0
 public Cart(ImmovableObject i) : base(i)
 {
     CurrentPosition  = i;
     PreviousPosition = null;
     IsFull           = true;
 }