Example #1
0
        public void Mars_CalculateUnderBoundaryBoth()
        {
            Mars mars = new Mars(10, 10);

            Position position = mars.CalculateOutOfBoundaryPosition(new Position(-4, -56));

            Assert.AreEqual(6, position.X);
            Assert.AreEqual(4, position.Y);
        }
Example #2
0
        public void Mars_CalculateOutOfBoundaryHorizontal()
        {
            Mars mars = new Mars(10, 10);

            Position position = mars.CalculateOutOfBoundaryPosition(new Position(10, 5));

            Assert.AreEqual(0, position.X);
            Assert.AreEqual(5, position.Y);
        }
Example #3
0
        public void Mars_CalculateUnderBoundaryVertically()
        {
            Mars mars = new Mars(10, 10);

            Position position = mars.CalculateOutOfBoundaryPosition(new Position(5, -1));

            Assert.AreEqual(5, position.X);
            Assert.AreEqual(9, position.Y);
        }