Пример #1
0
 public void Undo(PhutballMoveContext context)
 {
     var board = context.FieldsUpdater;
     _selectedField.Select();
     _jumpedFields.Each(field => field.PlaceBlackStone());
     _newSelectedField.DeSelect();
     _selectedField.PlaceWhiteStone();
     _newSelectedField.RemoveStone();
     NotifyOfFieldsStateChange(board);
 }
Пример #2
0
        public void Undo(PhutballMoveContext context)
        {
            var board = context.FieldsUpdater;

            _selectedField.Select();
            _jumpedFields.Each(field => field.PlaceBlackStone());
            _newSelectedField.DeSelect();
            _selectedField.PlaceWhiteStone();
            _newSelectedField.RemoveStone();
            NotifyOfFieldsStateChange(board);
        }
Пример #3
0
 public void Undo(PhutballMoveContext context)
 {
     _moves.AsEnumerable().Reverse().Each(move => context.PerformMoves.Undo(move));
 }
Пример #4
0
 public void Perform(PhutballMoveContext context)
 {
     _moves.Each(move => context.PerformMoves.Perform(move));
 }
Пример #5
0
 public void Undo(PhutballMoveContext context)
 {
     _moves.AsEnumerable().Reverse().Each(move => context.PerformMoves.Undo(move));
 }
Пример #6
0
 public void Perform(PhutballMoveContext context)
 {
     _moves.Each(move => context.PerformMoves.Perform(move));
 }