First round of substantial bug fixes
This commit is contained in:
@ -4,6 +4,8 @@ package main
|
||||
import (
|
||||
"cardSimEngine/cardsim"
|
||||
"fmt"
|
||||
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -38,6 +40,7 @@ func main() {
|
||||
Name: cardsim.MsgStr("Stats"),
|
||||
Intro: cardsim.MsgStr("Hi! These are the smoke test stats."),
|
||||
},
|
||||
ruledumper{},
|
||||
}
|
||||
p.Prompt = prompt{}
|
||||
p.DebugLevel = 5
|
||||
@ -58,5 +61,18 @@ func (prompt) Title(p *cardsim.Player[*SmokeTestCollection]) cardsim.Message {
|
||||
}
|
||||
|
||||
func (prompt) Info(p *cardsim.Player[*SmokeTestCollection]) ([]cardsim.Message, error) {
|
||||
return []cardsim.Message{cardsim.MsgStr("Here, have some stuff.")}, nil
|
||||
return []cardsim.Message{
|
||||
cardsim.MsgStr("Here, have some stuff."),
|
||||
cardsim.Msgf("It's turn %d according to the player and turn %d according to me.", p.TurnNumber, p.Stats.Turns.Value),
|
||||
}, nil
|
||||
}
|
||||
|
||||
type ruledumper struct{}
|
||||
|
||||
func (ruledumper) Title(p *player) cardsim.Message {
|
||||
return cardsim.MsgStr("Rule Dumper")
|
||||
}
|
||||
|
||||
func (ruledumper) Info(p *player) ([]cardsim.Message, error) {
|
||||
return []cardsim.Message{cardsim.Msgf("%# v", pretty.Formatter(p.Rules))}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user