big_road

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

功能:大路 说明:

功能:大路-画 说明:

功能:大路统计 说明:

功能:大路-svg 说明:

功能:大路-列 说明:

功能:大路-节点 说明:

Index

Constants

View Source
const (
	BANKER_NODE string = "🔴"  //庄
	PLAYER_NODE string = "🔵"  //闲
	TIE_NODE    string = "⚫️" //和
	NIL_NODE    string = "⚪️" //空
)
View Source
const (
	SCALE             = 1.5                      //缩放比
	GRID_WIDTH        = 22 + 5                   //格子的宽度
	GRID_HEIGHT       = 22 + 5                   //格子的高度
	NODE_CIRCLE_R     = 8                        //节点半径
	LEFT_SPACE        = 30                       //左边留白
	RIGHT_SPACE       = 30                       //右边留白
	MIN_ROW_CNT       = 6                        //最小行数
	MIN_WIDTH         = 600                      //最小宽度
	H_HEADER          = 50                       //header高
	H_HEADING         = 30                       //标题
	H_FOOTER          = 40                       //footer高
	TXT_FOOTER        = xutils.POKER_X_STUDIO    //页脚 文字
	TXT_HEADER        = "百家乐大路图"                 //
	STYLE_BG          = "fill:#FFF"              //svg背景
	STYLE_HEADER_TXT  = "font-size:22;fill:#000" //
	STYLE_HEADING_BG  = "fill:#FFF"              //svg标题背景
	STYLE_HEADING_TXT = "font-size:18;fill:#000" //
	STYLE_FOOTER_TXT  = "font-size:22;fill:#000" //
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BigRoad

type BigRoad struct {
	// contains filtered or unexported fields
}

大路

func NewBigRoad

func NewBigRoad(nodes []Node) *BigRoad

func NewBigRoadWithCols

func NewBigRoadWithCols(cols []*Col) *BigRoad

func NewBigRoadWithNodes

func NewBigRoadWithNodes(suggestion_nodes []*suggestion.FeedbackNode) *BigRoad

NewBigRoadWithNodes 策略节点链构造大路

func (*BigRoad) Col_cnt

func (b *BigRoad) Col_cnt() int

Col_cnt 列数

func (*BigRoad) Col_max_node_cnt

func (b *BigRoad) Col_max_node_cnt() int

Col_max_node_cnt 最长列节点个数

func (*BigRoad) Extract_bigroad_stat

func (b *BigRoad) Extract_bigroad_stat() *BigRoadStat

Extract_bigroad_stat 提取列统计

func (*BigRoad) Extract_stat_for_svg

func (b *BigRoad) Extract_stat_for_svg() (banker_cnt int, player_cnt int, win_cnt int, lose_cnt int, total_bet_amont int, total_result_score float64)

Extract_stat_for_svg 统计信息

func (*BigRoad) Get_col

func (b *BigRoad) Get_col(col_index int) *Col

Get_col 获取列

func (*BigRoad) Last_col

func (b *BigRoad) Last_col() *Col

Last_col 最后的一列

func (*BigRoad) Total_cnt

func (b *BigRoad) Total_cnt() int

Total_cnt 总个数

type BigRoadStat

type BigRoadStat struct {
	Col_stats []ColStat //列统计
}

大路统计

func (*BigRoadStat) String

func (b *BigRoadStat) String() string

type BigRoadSvg

type BigRoadSvg struct {
	// contains filtered or unexported fields
}

func Instance_big_road_svg

func Instance_big_road_svg() *BigRoadSvg

单例

func (*BigRoadSvg) Make_svg

func (s *BigRoadSvg) Make_svg(bigroad *BigRoad, is_view_index bool, bet_amount_comment string) string

生成svg图 返回:svg图字符串

type Col

type Col struct {
	// contains filtered or unexported fields
}

Col 列,列中的所有元素都相同

func (*Col) Cnt

func (c *Col) Cnt() int

Cnt 列中的个数

func (*Col) Get_node

func (c *Col) Get_node(index int) *Node

Get_node 获取节点

func (*Col) Result_area

func (c *Col) Result_area() BET_AREA.TYPE

type ColStat

type ColStat struct {
	Hands_per_col int //每列手数
	Cols_cnt      int //列数
}

列统计

func (*ColStat) String

func (c *ColStat) String() string

type Node

type Node struct {
	// contains filtered or unexported fields
}

大路中的节点

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL