public bool CanBeExecuted() { if (_health.IsDead) { return(false); } if (_doable == null) { // whether or not the move is valid is determined at the first execution. _doable = _mover.CanMoveInDirection(Direction); } return(_doable.Value); }
public bool CanBeExecuted() { if (_health.IsDead) { return(false); } if (_doable == null) { // whether or not the move is valid is determined at the first execution. _doable = _mover.CanMoveInDirection(Direction); } return(_doable.Value); }