Beispiel #1
0
        public void IsCellInBounds_returns_true_if_coordinates_is_inside_of_bounds()
        {
            GridNavigator navigator = new GridNavigator(10, 10);

            Assert.IsTrue(navigator.IsCellInBounds(1, 2));
            Assert.IsTrue(navigator.IsCellInBounds(9, 9));
            Assert.IsTrue(navigator.IsCellInBounds(0, 0));
        }
Beispiel #2
0
        public void IsCellInBounds_returns_false_if_coordinates_is_outside_of_bounds()
        {
            GridNavigator navigator = new GridNavigator(10, 10);

            Assert.IsFalse(navigator.IsCellInBounds(11, 0));
            Assert.IsFalse(navigator.IsCellInBounds(10, 10));
            Assert.IsFalse(navigator.IsCellInBounds(0, 11));
            Assert.IsFalse(navigator.IsCellInBounds(-1, 0));
            Assert.IsFalse(navigator.IsCellInBounds(0, -1));
        }