public void WhenAddPirateShouldSetPosition()
        {
            //Arrange
            var pirate   = Black.Pirate;
            var stubCell = new StubCell(3, 4);

            //Act
            stubCell.AddPirate(pirate);

            //Assert
            pirate.Position
            .ShouldBeEqual(new Position(3, 4));
        }
Exemple #2
0
        public void HeCanNotStayIfThereAreFoes()
        {
            var foe = Red.Pirate;

            amazonCell.PirateComing(foe);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            amazonCell.PirateCanComeFrom(stubCell);

            // Assert
            amazonCell.Pirates.ShouldContain().Exact(foe);
        }
Exemple #3
0
        public void HeCanStayIfThereAreAlly()
        {
            var player = new Player(TeamType.Red, TeamType.Black, new TestEmptyRules());
            var ally   = player.GetNextTeam().Pirates.Current;

            pirate = player.GetNextTeam().Pirates.Current;

            amazonCell.PirateComing(ally);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            amazonCell.PirateCanComeFrom(stubCell);
            amazonCell.PirateComing(pirate);

            // Assert
            amazonCell.Pirates.ShouldContain().Elements(ally, pirate);
        }
Exemple #4
0
        public void HeCanStayIfThereAreAlly()
        {
            var ally = Red.Pirate;

//            ally.Aliance = TeamType.Black;
//            pirate.Aliance = TeamType.Red;

            fortressCell.PirateComing(ally);

            var stubCell = new StubCell();

            stubCell.AddPirate(pirate);

            // Act
            fortressCell.PirateCanComeFrom(stubCell);
            fortressCell.PirateComing(pirate);

            // Assert
            fortressCell.Pirates.ShouldContain().Elements(ally, pirate);
        }