Example #1
0
        public void Contains_OnOppositeDiagonalSide_ReturnsFalse()
        {
            var w = new WordLocation(100, 150, 1, 1, 3);

            Assert.False(w.Contains(99, 149));
        }
Example #2
0
        public void Contains_InvalidLine_ReturnsFalse()
        {
            var w = new WordLocation(100, 150, 1, 1, 2);

            Assert.False(w.Contains(102, 153));
        }
Example #3
0
        public void Contain_OnOppositeStraightSide_ReturnsFalse()
        {
            var w = new WordLocation(100, 150, -1, 0, 3);

            Assert.False(w.Contains(100, 151));
        }
Example #4
0
        public void Contains_DownLeftWordSixAway_ReturnsFalse()
        {
            var w = new WordLocation(100, 150, -1, 1, 6);

            Assert.False(w.Contains(106, 144));
        }
Example #5
0
        public void Contains_UpRightWordSixAway_ReturnsFalse()
        {
            var w = new WordLocation(100, 150, 1, -1, 6);

            Assert.False(w.Contains(94, 156));
        }
Example #6
0
        public void Contains_DownLeftWordFiveAway_ReturnsTrue()
        {
            var w = new WordLocation(100, 150, -1, 1, 6);

            Assert.True(w.Contains(105, 145));
        }
Example #7
0
        public void Contains_UpRightWordFiveAway_ReturnsTrue()
        {
            var w = new WordLocation(100, 150, 1, -1, 6);

            Assert.True(w.Contains(95, 155));
        }
Example #8
0
        public void Contains_GivenStartingPoint_ReturnsTrue()
        {
            var w = new WordLocation(47, 39, 1, 1, 10);

            Assert.True(w.Contains(47, 39));
        }