Ejemplo n.º 1
0
        public void AttackedAndBeingHit()
        {
            var startPosition = new Position()
            {
                X = 1, Y = 1
            };
            var battleship = new OfxCodeExercise.Battleship.Lib.Battleship(1, startPosition, Orientation.Vertical, 5);

            battleship.Attacked(new Position {
                X = 1, Y = 5
            }).Should().BeTrue();
        }
Ejemplo n.º 2
0
        public void AttackedAndMissed()
        {
            var startPosition = new Position()
            {
                X = 0, Y = 0
            };
            var battleship = new OfxCodeExercise.Battleship.Lib.Battleship(1, startPosition, Orientation.Vertical, 5);

            battleship.Attacked(new Position {
                X = 1, Y = 1
            }).Should().BeFalse();
        }