Can't assume CanDo is always there.
BasicPolicy doesn't know how to do fallback, that's driven by the VerbosePolicy. But the VerbosePolicy isn't there if BasicPolicy is trying to use CanDo itself. Just remove the check.
This commit is contained in:
parent
1eedfb50e8
commit
f7bed6c4b9
@ -156,10 +156,7 @@ func (b *BasicPolicy) Enact(p *Player) (cardsim.Message, error) {
|
|||||||
}
|
}
|
||||||
return b.NothingChanged, nil
|
return b.NothingChanged, nil
|
||||||
}
|
}
|
||||||
if b.Enabled(p) {
|
|
||||||
return b.Do(p)
|
return b.Do(p)
|
||||||
}
|
|
||||||
return nil, ErrOptionNotEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unenact implements Policy.
|
// Unenact implements Policy.
|
||||||
|
Loading…
Reference in New Issue
Block a user