config_obj

package
v0.0.0-...-292cba7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 6 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() []e.Stone

GetBoardArray - 盤上の石の色の配列 0: 空点 1: 黒石 2: 白石 3: 枠

func (*Config) Komi

func (config *Config) Komi() float64

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

func (*Config) MaxPositionNumber

func (config *Config) MaxPositionNumber() int

MaxPositionNumber - 最大手数

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