예제 #1
0
        public void HeCanNotStayOnCrocoCell()
        {
            // Arrange
            var testEmptyRules = new TestEmptyRules();
            var field          = new Field(testEmptyRules);

            var startCell = field.Cells(3, 3);
            var crocoCell = new CrocoCell(4, 3);

            field.Draw(crocoCell);
            field.SetPirateOnCell(pirate, startCell);

            // Act
            field.SelectPirate(startCell);
            field.MovePirateTo(pirate, crocoCell);

            // Assert
            startCell.Pirates.ShouldContain().Exact(pirate);
            crocoCell.Pirates.ShouldBeEmpty();
        }
예제 #2
0
        public void PathShouldContainCroco()
        {
            // Arrange
            var field = new GreenField();

            pirate = field.CurrentPirate;

            var startCell = field.Cells(3, 3);
            var crocoCell = new CrocoCell(4, 3);

            field.InsertCell(crocoCell);

            field.SetPirateOnCell(pirate, startCell);

            // Act
            field.MovePirateTo(pirate, crocoCell);

            // Assert
            pirate.Path.ShouldContain()
            .Elements(startCell.Position, crocoCell.Position, crocoCell.Position, startCell.Position);
        }
예제 #3
0
 public void TestInit()
 {
     crocoCell = new CrocoCell(1, 1);
 }