Documentation ¶
Index ¶
- Variables
- func GenMoveList(pPos *Position) []l03.Move
- func MainLoop()
- func Search(pPos *Position) l03.Move
- func SprintBoard(pos *Position) string
- type Position
- func (pos *Position) DoMove(move l03.Move)
- func (pPos *Position) GetPieceAtIndex(idx int) l03.Piece
- func (pPos *Position) GetPieceAtSq(sq l03.Square) l03.Piece
- func (pPos *Position) Hetero(to l03.Square) bool
- func (pPos *Position) Homo(to l03.Square) bool
- func (pos *Position) ReadPosition(command string)
- func (pos *Position) ResetToStartpos()
- func (pos *Position) UndoMove()
Constants ¶
This section is empty.
Variables ¶
View Source
var App l01.Lesson01App
App - アプリケーション変数の宣言
Functions ¶
func GenMoveList ¶
GenMoveList - 現局面の指し手のリスト。合法手とは限らないし、全ての合法手を含むとも限らないぜ(^~^)
Types ¶
type Position ¶
type Position struct { // [19] は 1九、 [91] は 9一(^~^)反時計回りに90°回転した将棋盤の状態で入ってるぜ(^~^)想像しろだぜ(^~^) Board []l03.Piece // 持ち駒の数だぜ(^~^) R, B, G, S, N, L, P, r, b, g, s, n, l, p Hands []int // 先手が1、後手が2(^~^) Phase l03.Phase // 開始局面の時点で何手目か(^~^)これは表示のための飾りのようなものだぜ(^~^) StartMovesNum int // 開始局面から数えて何手目か(^~^)0から始まるぜ(^~^) OffsetMovesIndex int // 指し手のリスト(^~^) // 1手目は[0]へ、512手目は[511]へ入れろだぜ(^~^) Moves [l02.MOVES_SIZE]l03.Move // 取った駒のリスト(^~^)アンドゥ ムーブするときに使うだけ(^~^)指し手のリストと同じ添え字を使うぜ(^~^) CapturedList [l02.MOVES_SIZE]l03.Piece }
Position - 局面
func NewPosition ¶
func NewPosition() *Position
func (*Position) ReadPosition ¶
ReadPosition - 局面を読み取ります。マルチバイト文字は含まれていないぜ(^q^)
func (*Position) ResetToStartpos ¶
func (pos *Position) ResetToStartpos()
ResetToStartpos - 初期局面にします。
Click to show internal directories.
Click to hide internal directories.