Пример #1
0
        public void PutGoalTest(AbstractField field, List <AbstractPiece> pieces, List <PutEvent> expectedEvents)
        {
            // Arrange

            // Act & Assert
            for (int i = 0; i < pieces.Count; ++i)
            {
                PutEvent result = field.Put(pieces[i]).putEvent;
                Assert.Equal(expectedEvents[i], result);
            }
        }
Пример #2
0
 private void PutNormalOnNonGoal(AbstractPiece piece, AbstractField position)
 {
     _returnedEnum = PutResultEnum.NormalOnNonGoalField;
     position.Put(piece);
 }
Пример #3
0
 private void PutNonShamOnGoal(AbstractPiece piece, AbstractField position, Map map)
 {
     map.ScorePoint(position, _agentId);
     _returnedEnum = PutResultEnum.NormalOnGoalField;
     position.Put(piece);
 }
Пример #4
0
 private void PutPieceOutsideGoalArea(AbstractPiece piece, AbstractField position)
 {
     _returnedEnum = PutResultEnum.TaskField;
     position.Put(piece);
 }
Пример #5
0
 public (PutEvent putEvent, bool wasPieceRemoved) Put(AbstractField field)
 {
     return(field.Put(this));
 }