Documentation ¶
Overview ¶
Package spoilerguard implements Spoiler Guard, a method of blocking cards that would be a spoiler for a Bug Fables player who has not completed the game.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct { Quest QuestProgress `json:"q"` MetCarmina bool `json:"t"` CarminaApproved bool `json:"a"` Menu uint32 `json:"m,omitempty"` Deck card.Deck `json:"d"` SeenSpiedEnemies []uint8 `json:"s"` }
Data is the stored data for Spoiler Guard.
func ParseSaveData ¶ added in v0.3.1
func SurveyData ¶ added in v0.3.1
func (*Data) State ¶ added in v0.3.1
func (d *Data) State() GuardState
State returns the GuardState for the player's stored data.
type GuardState ¶ added in v0.3.1
type GuardState uint8
GuardState is a warning level for a player with Spoiler Guard enabled. Higher numeric values correspond to less danger of encountering spoilers.
const ( StateQuestLocked GuardState = iota StateQuestNotAccepted StateQuestNotCompleted StateNotMetCarmina StateCardsNotApproved StateNotAllSeen StateNotAllSpied StateDisabled )
Constants for GuardState.
func (GuardState) Block ¶ added in v0.3.1
func (s GuardState) Block() bool
Block returns true if the player should not be allowed to play Spy Cards at all in this state.
func (GuardState) String ¶ added in v0.3.1
func (i GuardState) String() string
type QuestProgress ¶
type QuestProgress int8
QuestProgress is a player's progress in the "Requesting Assistance" quest.
const ( QuestAvailable QuestProgress = 0 QuestTaken QuestProgress = 1 QuestComplete QuestProgress = 2 )
Constants for QuestProgress.
func (QuestProgress) String ¶ added in v0.3.1
func (i QuestProgress) String() string
Click to show internal directories.
Click to hide internal directories.