config_obj

package
v0.0.0-...-50f0772 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Nngs Nngs
	Game Game
}

Config - Tomlファイル

func LoadGameConf

func LoadGameConf(
	path string,
	onFatal func(string)) Config

LoadGameConf - ゲーム設定ファイルを読み込みます

func (Config) BoardSize

func (config Config) BoardSize() int

BoardSize - 何路盤か

func (Config) GetBoardArray

func (config Config) GetBoardArray() []int

GetBoardArray - 盤上の石の色の配列

func (Config) Komi

func (config Config) Komi() float64

Komi - float 32bit で足りるが、実行速度優先で float 64bit に変換して返します

func (Config) MaxMovesNum

func (config Config) MaxMovesNum() int

MaxMovesNum - 最大手数

func (Config) SentinelBoardArea

func (config Config) SentinelBoardArea() int

SentinelBoardArea - 枠付きの盤上の交点の数

type Game

type Game struct {
	Komi      float32
	BoardSize int8
	MaxMoves  int16
	BoardData string
}

Game - Game テーブル

type Nngs

type Nngs struct {
	Server string
	Port   uint16
	User   string
	Pass   string
}

Nngs - Nngs テーブル

Jump to

Keyboard shortcuts

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