Smoke testing for debug actions.

Just moves one of the existing actions to a debug action slot.
This commit is contained in:
Kistaro Windrider 2023-04-15 17:21:28 -07:00
parent 54711b36a8
commit 4a91230376
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8
2 changed files with 8 additions and 8 deletions

View File

@ -119,8 +119,8 @@ func initDeck(d *cardsim.Deck[*SmokeTestCollection]) {
func installPermanentActions(pa *[]card) { func installPermanentActions(pa *[]card) {
*pa = []card{ *pa = []card{
&cardsim.BasicCard[*SmokeTestCollection]{ &cardsim.BasicCard[*SmokeTestCollection]{
CardTitle: cardsim.MsgStr("Reset to 0"), CardTitle: cardsim.MsgStr("Reset Number"),
CardText: cardsim.MsgStr("Resets Number to 0."), CardText: cardsim.MsgStr("Resets Number to a fixed value."),
CardOptions: []cardOption{ CardOptions: []cardOption{
&cardsim.BasicOption[*SmokeTestCollection]{ &cardsim.BasicOption[*SmokeTestCollection]{
Text: cardsim.MsgStr("Reset to 0."), Text: cardsim.MsgStr("Reset to 0."),
@ -130,12 +130,6 @@ func installPermanentActions(pa *[]card) {
}, },
Output: cardsim.MsgStr("Done."), Output: cardsim.MsgStr("Done."),
}, },
},
},
&cardsim.BasicCard[*SmokeTestCollection]{
CardTitle: cardsim.MsgStr("Reset to 1000000"),
CardText: cardsim.MsgStr("Resets Number to one million."),
CardOptions: []cardOption{
&cardsim.BasicOption[*SmokeTestCollection]{ &cardsim.BasicOption[*SmokeTestCollection]{
Text: cardsim.MsgStr("Reset to 1,000,000"), Text: cardsim.MsgStr("Reset to 1,000,000"),
Effect: func(p *player) error { Effect: func(p *player) error {
@ -146,6 +140,11 @@ func installPermanentActions(pa *[]card) {
}, },
}, },
}, },
}
}
func installDebugActions(pa *[]card) {
*pa = []card{
&cardsim.BasicCard[*SmokeTestCollection]{ &cardsim.BasicCard[*SmokeTestCollection]{
CardTitle: cardsim.MsgStr("Draw a card"), CardTitle: cardsim.MsgStr("Draw a card"),
CardText: cardsim.MsgStr("Draw an extra card."), CardText: cardsim.MsgStr("Draw an extra card."),

View File

@ -40,6 +40,7 @@ func main() {
installRules(p.Rules) installRules(p.Rules)
initDeck(p.Deck) initDeck(p.Deck)
installPermanentActions(&p.PermanentActions) installPermanentActions(&p.PermanentActions)
installDebugActions(&p.DebugActions)
p.InfoPanels = []cardsim.InfoPanel[*SmokeTestCollection]{ p.InfoPanels = []cardsim.InfoPanel[*SmokeTestCollection]{
&cardsim.BasicStatsPanel[*SmokeTestCollection]{ &cardsim.BasicStatsPanel[*SmokeTestCollection]{
Name: cardsim.MsgStr("Stats"), Name: cardsim.MsgStr("Stats"),