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:
@ -156,10 +156,7 @@ func (b *BasicPolicy) Enact(p *Player) (cardsim.Message, error) {
|
||||
}
|
||||
return b.NothingChanged, nil
|
||||
}
|
||||
if b.Enabled(p) {
|
||||
return b.Do(p)
|
||||
}
|
||||
return nil, ErrOptionNotEnabled
|
||||
return b.Do(p)
|
||||
}
|
||||
|
||||
// Unenact implements Policy.
|
||||
|
Reference in New Issue
Block a user