func (pos *TPosition) ToPrintable() string { var buff = "" for i := 0; i < square.BOARD_SIZE; i++ { var fenchar = piece.ToFenChar(piece.TPiece(pos[i])) if fenchar == ' ' { fenchar = '.' } buff += string(fenchar) if ((i + 1) % square.BOARD_WIDTH) == 0 { buff += "\n" } } buff += fmt.Sprintf("\nturn : %c , depth : %d , wkpos : %s , bkpos : %s\n", TurnToChar(pos.GetTurn()), pos.GetDepth(), square.ToAlgeb(pos.GetKingPos(piece.WHITE)), square.ToAlgeb(pos.GetKingPos(piece.BLACK))) return buff }
func (m *TMove) ToAlgeb() string { return fmt.Sprintf("%s%s", square.ToAlgeb(m.From), square.ToAlgeb(m.To)) }