Ejemplo n.º 1
0
        public void TestGetValidHorizontalPositionMethod()
        {
            Position pos   = new Position(1, 1);
            var      moves = PositionUtil.GetValidHorizontalPosition(pos).ToList();

            Assert.IsNotNull(moves);
            Assert.AreEqual(7, moves.Count);

            var possibles = new[] { new Position(1, 2), new Position(1, 3), new Position(1, 4), new Position(1, 5), new Position(1, 6), new Position(1, 7), new Position(1, 8) };

            foreach (var possible in possibles)
            {
                Assert.IsTrue(moves.Contains(possible));
            }
        }