Ejemplo n.º 1
0
    private bool MoveToNextCell()
    {
        bool isAdjacent = _gridBhv.IsAdjacentOpponent(_characterBhv.X, _characterBhv.Y, _characterBhv.OpponentBhvs);

        if (_characterBhv.Pm <= 0 ||
            (isAdjacent && _characterBhv.Pm <= 1))
        {
            return(false);
        }
        var lostPm = isAdjacent ? 2 : 1;

        _characterBhv.LosePm(lostPm);
        _characterBhv.MoveToFirstPathStep();
        return(true);
    }