本文整理汇总了Golang中github.com/twoodhouse/coup-sim/model/log.Entity.PrettyJsonStr方法的典型用法代码示例。如果您正苦于以下问题:Golang Entity.PrettyJsonStr方法的具体用法?Golang Entity.PrettyJsonStr怎么用?Golang Entity.PrettyJsonStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/twoodhouse/coup-sim/model/log.Entity
的用法示例。
在下文中一共展示了Entity.PrettyJsonStr方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: GetStealBlockCardChoice
func (entity *Entity) GetStealBlockCardChoice(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) int {
fmt.Println(log.PrettyJsonStr())
printPersonalTable(entity.playerName, playerNames, coinInfo, faceupInfo, deck)
var choice int
fmt.Printf("GetStealBlockCardChoice:\n> ")
fmt.Scanf("%d\n", &choice)
return choice
}
示例2: GetChallenge
func (entity *Entity) GetChallenge(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) bool {
fmt.Println(log.PrettyJsonStr())
printPersonalTable(entity.playerName, playerNames, coinInfo, faceupInfo, deck)
var challenge bool
fmt.Printf("GetChallenge:\n> ")
fmt.Scanf("%t\n", &challenge)
return challenge
}
示例3: GetBlock
func (entity *Entity) GetBlock(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) bool {
fmt.Println(log.PrettyJsonStr())
printPersonalTable(entity.playerName, playerNames, coinInfo, faceupInfo, deck)
var block bool
fmt.Printf("GetBlock:\n> ")
fmt.Scanf("%t\n", &block)
return block
}
示例4: GetTarget
func (entity *Entity) GetTarget(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) string {
fmt.Println(log.PrettyJsonStr())
printPersonalTable(entity.playerName, playerNames, coinInfo, faceupInfo, deck)
var target string
fmt.Printf("GetTarget:\n> ")
fmt.Scanf("%s\n", &target)
return target
}
示例5: GetExchangeReturnChoices
func (entity *Entity) GetExchangeReturnChoices(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) (int, int) {
fmt.Println(log.PrettyJsonStr())
// fmt.Printf("Cards gained by using exchange: %d%d\n", c1, c2)
printPersonalTable(entity.playerName, playerNames, coinInfo, faceupInfo, deck)
var r1 int
fmt.Printf("GetExchangeReturnChoices(1):\n> ")
fmt.Scanf("%d\n", &r1)
var r2 int
fmt.Printf("GetExchangeReturnChoices(2):\n> ")
fmt.Scanf("%d\n", &r2)
return r1, r2
}