Documentation ¶
Index ¶
- Constants
- func GetNameFromFileRank(file int, rank int) string
- func GetXYFromName(name string) (int, int, error)
- type Engine
- type EngineConf
- type Position
- func (position *Position) AddMoves(tIdx int, color int, sec float64)
- func (position Position) BoardSize() int
- func (position Position) ColorAt(tIdx int) int
- func (position Position) ColorAtFileRank(file int, rank int) int
- func (position Position) CopyData() []int
- func (position Position) CountLiberty(tIdx int, pLiberty *int, stoneCount *int)
- func (position Position) Exists(tIdx int) bool
- func (position Position) GetEmptyTIdx() int
- func (position Position) GetFileRankFromTIdx(tIdx int) (int, int)
- func (position Position) GetNameFromTIdx(tIdx int) string
- func (position Position) GetTIdxFromFileRank(file int, rank int) int
- func (position *Position) ImportData(boardCopy2 []int)
- func (position Position) Komi() float64
- func (position Position) MaxMoves() int
- func (position *Position) PutStone(tIdx int, color int, fillEyeErr int) int
- func (position Position) SentinelBoardMax() int
- func (position Position) SentinelWidth() int
- func (position *Position) SetColor(tIdx int, color int)
- func (position *Position) TakeStone(tIdx int, color int)
- type Profile
Constants ¶
View Source
const ( // DoNotFillEye - 自分の眼を埋めるなってこと☆(^~^) DoNotFillEye = 1 // MayFillEye - 自分の眼を埋めてもいいってこと☆(^~^) MayFillEye = 0 )
Variables ¶
This section is empty.
Functions ¶
func GetNameFromFileRank ¶
GetNameFromFileRank - (1,1) を "A1" に変換
Types ¶
type EngineConf ¶
EngineConf - Tomlファイル。
func (EngineConf) GetBoardArray ¶
func (config EngineConf) GetBoardArray() []int
GetBoardArray - 盤上の石の色の配列。
func (EngineConf) Komi ¶
func (config EngineConf) Komi() float64
Komi - float 32bit で足りるが、実行速度優先で float 64bit に変換して返します。
func (EngineConf) SentinelBoardMax ¶
func (config EngineConf) SentinelBoardMax() int
SentinelBoardMax - 枠付きの盤上の交点の数
type Position ¶
type Position struct { // KoIdx - コウの交点。Idx(配列のインデックス)表示。 0 ならコウは無し? KoIdx int // Dir4 - 4方向(右、下、左、上)の番地。初期値は仮の値。 Dir4 [4]int // MovesNum - 手数 MovesNum int // Record - 棋譜 Record []int // RecordTime - 一手にかかった時間。 RecordTime []float64 // contains filtered or unexported fields }
Position - 局面 盤面や、棋譜を含む
func NewPosition ¶
func NewPosition(boardData []int, boardSize int, sentinelBoardMax int, komi float64, maxMoves int) *Position
NewPosition - 盤を作成します。
func (Position) ColorAtFileRank ¶
ColorAtFileRank - 指定した交点の石の色 * `file` - 1 Origin. * `rank` - 1 Origin.
func (Position) CountLiberty ¶
CountLiberty - 呼吸点を数えます。
func (Position) GetEmptyTIdx ¶
GetEmptyTIdx - 空点の tIdx(配列のインデックス)を返します。
func (Position) GetFileRankFromTIdx ¶
GetFileRankFromTIdx - tIdx(配列のインデックス)を、file, rank へ変換します。
func (Position) GetNameFromTIdx ¶
GetNameFromTIdx -
func (Position) GetTIdxFromFileRank ¶
GetTIdxFromFileRank - x,y を tIdx(配列のインデックス)へ変換します。
func (*Position) ImportData ¶
ImportData - 盤データのコピー。
func (Position) SentinelBoardMax ¶
SentinelBoardMax - 枠付きの盤の交点数
func (Position) SentinelWidth ¶
SentinelWidth - 枠付きの盤の一辺の交点数
Click to show internal directories.
Click to hide internal directories.