Esempio n. 1
0
        private Paths Takings(Towards towards)
        {
            var moves            = new Paths();
            var direction        = new Direction(towards);
            var vector           = new Vector(direction);
            var nextCapturedItem = CreateDraught(vector, MainItem.Clothes.InverseColour());

            MoveMainItem(vector.Multiple(Constants.DISTANCE_FOR_SIMPLE_TAKING));
            Captured.AddItem(nextCapturedItem);
            if (TakingExists())
            {
                moves.AddMoves(Takings());
            }
            else
            {
                moves.AddPath(new Path(MainItem.Coordinates));
            }
            MoveMainItem(vector.Multiple(-1 * Constants.DISTANCE_FOR_SIMPLE_TAKING));
            Captured.DeleteItem(nextCapturedItem);
            moves.InsertAtBeginning(MainItem.Coordinates);
            return(moves);
        }