当前位置: 首页>>代码示例>>Golang>>正文


Golang Entity.PrettyJsonStr方法代码示例

本文整理汇总了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
}
开发者ID:twoodhouse,项目名称:coup-sim,代码行数:8,代码来源:consoleStrategy.go

示例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
}
开发者ID:twoodhouse,项目名称:coup-sim,代码行数:8,代码来源:consoleStrategy.go

示例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
}
开发者ID:twoodhouse,项目名称:coup-sim,代码行数:8,代码来源:consoleStrategy.go

示例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
}
开发者ID:twoodhouse,项目名称:coup-sim,代码行数:8,代码来源:consoleStrategy.go

示例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
}
开发者ID:twoodhouse,项目名称:coup-sim,代码行数:12,代码来源:consoleStrategy.go


注:本文中的github.com/twoodhouse/coup-sim/model/log.Entity.PrettyJsonStr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。