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:
kistaro committed 2023-04-03 21:15:43 -07:00
1 parent 1eedfb50e8
commit f7bed6c4b9
1 file changed
+1 -4
+1 -4
View File
@@ -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.