Smoke testing for debug actions.
Just moves one of the existing actions to a debug action slot.
This commit is contained in:
		| @@ -119,8 +119,8 @@ func initDeck(d *cardsim.Deck[*SmokeTestCollection]) { | ||||
| func installPermanentActions(pa *[]card) { | ||||
| 	*pa = []card{ | ||||
| 		&cardsim.BasicCard[*SmokeTestCollection]{ | ||||
| 			CardTitle: cardsim.MsgStr("Reset to 0"), | ||||
| 			CardText:  cardsim.MsgStr("Resets Number to 0."), | ||||
| 			CardTitle: cardsim.MsgStr("Reset Number"), | ||||
| 			CardText:  cardsim.MsgStr("Resets Number to a fixed value."), | ||||
| 			CardOptions: []cardOption{ | ||||
| 				&cardsim.BasicOption[*SmokeTestCollection]{ | ||||
| 					Text: cardsim.MsgStr("Reset to 0."), | ||||
| @@ -130,12 +130,6 @@ func installPermanentActions(pa *[]card) { | ||||
| 					}, | ||||
| 					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]{ | ||||
| 					Text: cardsim.MsgStr("Reset to 1,000,000"), | ||||
| 					Effect: func(p *player) error { | ||||
| @@ -146,6 +140,11 @@ func installPermanentActions(pa *[]card) { | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func installDebugActions(pa *[]card) { | ||||
| 	*pa = []card{ | ||||
| 		&cardsim.BasicCard[*SmokeTestCollection]{ | ||||
| 			CardTitle: cardsim.MsgStr("Draw a card"), | ||||
| 			CardText:  cardsim.MsgStr("Draw an extra card."), | ||||
|   | ||||
| @@ -40,6 +40,7 @@ func main() { | ||||
| 	installRules(p.Rules) | ||||
| 	initDeck(p.Deck) | ||||
| 	installPermanentActions(&p.PermanentActions) | ||||
| 	installDebugActions(&p.DebugActions) | ||||
| 	p.InfoPanels = []cardsim.InfoPanel[*SmokeTestCollection]{ | ||||
| 		&cardsim.BasicStatsPanel[*SmokeTestCollection]{ | ||||
| 			Name:  cardsim.MsgStr("Stats"), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user