Exemplo n.º 1
0
// SetUpTestBoard stores the test data (string characters)
// in the Board as PointStatus information.
func SetUpTestBoard(N int, brd *ah.AbstHier, data *[]string) {
	for r := 0; r < N; r++ {
		for c := 0; c < N; c++ {
			brd.SetPoint(ah.MakeNodeLoc(ah.ColValue(c), ah.RowValue(r)), ah.PointStatus((*data)[r][c]))
		}
	}
}
Exemplo n.º 2
0
Arquivo: sgf.go Projeto: Ken1JF/sgf
// Convert the first 2 characters of a string into an SGF point represented as a NodeLoc
func SGFPoint(s []byte) (n ah.NodeLoc, err ah.ErrorList) {
	defer unt(tra("SGFPoint"))
	if len(s) < 2 {
		if len(s) == 0 {
			// TODO: check that SGF FF == 4 ???
			n = ah.PassNodeLoc
		} else {
			err.Add(ah.NoPos, "SGFPoint, len = "+strconv.Itoa(len(s))+" not 0 or 2 chars, "+string(s))
		}
	} else {
		col := strings.Index(sgf_coords, string(s[0:1]))
		if col < 0 {
			err.Add(ah.NoPos, "SGFPoint: bad col "+string(s[0:1]))
		}
		row := strings.Index(sgf_coords, string(s[1:2]))
		if row < 0 {
			err.Add(ah.NoPos, "SGFPoint: bad row "+string(s[1:2]))
		}
		if err == nil {
			n = ah.MakeNodeLoc(ah.ColValue(col), ah.RowValue(row))
		}
	}
	return n, err
}
Exemplo n.º 3
0
// ExampleCannonicalHandicap points]
func ExampleCannonicalHandicap() {
	for ha := 0; ha <= 9; ha++ {
		if ha != 1 {
			var gam *GameTree = new(GameTree)
			gam.InitAbstHier(19, 19, ah.StringLevel, true)
			gam.SetHandicap(ha)
			gam.PlaceHandicap(ha, 19)
			for r := 0; r < 19; r++ {
				for c := 0; c < 19; c++ {
					nl := ah.MakeNodeLoc(ah.ColValue(c), ah.RowValue(r))
					bp := &gam.Graphs[ah.PointLevel].Nodes[nl]
					if bp.GetNodeLowState() != uint16(ah.Black) {
						if gam.IsCanonical(nl, ah.BoardHandicapSymmetry[ha]) {
							bp.SetNodeHighState(uint16(ah.White))
							//gam.SetPoint(nl, ah.White)
						}
					}
				}
			}
			str := "Handicap pattern " + strconv.Itoa(ha)
			printInitBoard(&gam.AbstHier, str)
			for trans := ah.T_FIRST; trans <= ah.T_LAST; trans += 1 {
				newBrd := gam.AbstHier.TransBoard(trans)
				if checkHandicapBrds(&gam.AbstHier, newBrd) {
					fmt.Print(" false, /* ", ah.TransName[trans], " */")
					// TODO: replace?					printBrds("Error: inverse differs", &gam.AbstHier, newBrd, ah.TransName[trans])
				} else {
					fmt.Print(" true, /* ", ah.TransName[trans], " */")
				}
			}
			fmt.Println()
		}
	}
	checkHandicapCanonical()
	// Output:
	// Handicap pattern 0 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◘┼┼┼┼┼◘┼┼┼┼┼◎◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◘┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◘┼┼┼┼┼◘┼┼┼┼┼◘┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ true, /* T_ROTA_090 */ true, /* T_ROTA_180 */ true, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ true, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 2 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◘┼┼┼┼┼◘┼┼┼┼┼◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◘┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◎◎◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷◎
	//  true, /* T_IDENTITY */ false, /* T_ROTA_090 */ true, /* T_ROTA_180 */ false, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ false, /* T_FLP_VERT */ true, /* T_FLP_BACK */ false, /* T_FLP_HORI */
	// Handicap pattern 3 Board 19 by 19
	// ◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◎◎◎◎◎◎◎◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼◎◎◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼◎◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋◎◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◘┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉◎◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷◎
	//  true, /* T_IDENTITY */ false, /* T_ROTA_090 */ false, /* T_ROTA_180 */ false, /* T_ROTA_270 */ false, /* T_FLP_SLAS */ false, /* T_FLP_VERT */ true, /* T_FLP_BACK */ false, /* T_FLP_HORI */
	// Handicap pattern 4 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◘┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ true, /* T_ROTA_090 */ true, /* T_ROTA_180 */ true, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ true, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 5 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◘┼┼┼╋╋◉◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ true, /* T_ROTA_090 */ true, /* T_ROTA_180 */ true, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ true, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 6 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯◎◎◎◎◎◎◎◎◎◎
	// ┠╬┼┼┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼╬┼┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼┼┼◎◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼╋╋◎◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ false, /* T_ROTA_090 */ true, /* T_ROTA_180 */ false, /* T_ROTA_270 */ false, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ false, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 7 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯◎◎◎◎◎◎◎◎◎◎
	// ┠╬┼┼┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼╬┼┼┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼┼┼◎◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋◎◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼╋╋◉◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◘┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ false, /* T_ROTA_090 */ true, /* T_ROTA_180 */ false, /* T_ROTA_270 */ false, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ false, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 8 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◉┼┼┼┼┼◉┼┼┼┼┼◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼╋╋◎◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◉┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ true, /* T_ROTA_090 */ true, /* T_ROTA_180 */ true, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ true, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Handicap pattern 9 Board 19 by 19
	// ┏┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯┯◎
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼◎◎◎
	// ┠┼┼◉┼┼┼┼┼◉┼┼┼┼┼◉◎◎◎
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼◎◎◎◎◎
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼◎◎◎◎◎◎
	// ┠┼┼┼┼┼╬┼┼┼┼┼◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋◎◎◎◎◎◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋◎◎◎◎◎◎◎◎◎
	// ┠┼┼◉┼┼┼╋╋◉◎◎◎◎◎◉◎◎◎
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼┼╋╋╋╋╋┼┼┼┼┼┼┨
	// ┠┼┼┼┼┼╬┼┼┼┼┼╬┼┼┼┼┼┨
	// ┠┼┼┼┼╬┼┼┼┼┼┼┼╬┼┼┼┼┨
	// ┠┼┼┼╬┼┼┼┼┼┼┼┼┼╬┼┼┼┨
	// ┠┼┼◉┼┼┼┼┼◉┼┼┼┼┼◉┼┼┨
	// ┠┼╬┼┼┼┼┼┼┼┼┼┼┼┼┼╬┼┨
	// ┠╬┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼╬┨
	// ┗┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┷┛
	//  true, /* T_IDENTITY */ true, /* T_ROTA_090 */ true, /* T_ROTA_180 */ true, /* T_ROTA_270 */ true, /* T_FLP_SLAS */ true, /* T_FLP_VERT */ true, /* T_FLP_BACK */ true, /* T_FLP_HORI */
	// Checking T_IDENTITY and its inverse: T_IDENTITY
	// Checking T_ROTA_090 and its inverse: T_ROTA_270
	// Checking T_ROTA_180 and its inverse: T_ROTA_180
	// Checking T_ROTA_270 and its inverse: T_ROTA_090
	// Checking T_FLP_SLAS and its inverse: T_FLP_SLAS
	// Checking T_FLP_VERT and its inverse: T_FLP_VERT
	// Checking T_FLP_BACK and its inverse: T_FLP_BACK
	// Checking T_FLP_HORI and its inverse: T_FLP_HORI
}
Exemplo n.º 4
0
Arquivo: game.go Projeto: Ken1JF/sgf
// PlaceHandicap sets the handicap stones, and returns the list of points
func (gam *GameTree) PlaceHandicap(n int, siz int) (pts []uint8) {
	var lin, mid int
	//	var nl ah.NodeLoc
	//	var play bool = true
	place := func(c int, r int) {
		nl := ah.MakeNodeLoc(ah.ColValue(c), ah.RowValue(r))
		gam.DoAB(nl, true)
		pts = append(pts, SGFCoords(nl, gam.IsFF4())...)
	}
	lin = 3
	if siz < 13 {
		lin = 2
	}
	mid = (siz - 1) / 2
	switch n {
	case 0:
	case 2:
		place(siz-(lin+1), lin) // UpperRight
		place(lin, siz-(lin+1)) // LowerLeft
	case 3:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
	case 4:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
	case 5:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
		place(mid, mid)                 // mid point
	case 6:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
		place(lin, mid)                 // mid point Left side
		place(siz-(lin+1), mid)         // mid point Right side
	case 7:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
		place(lin, mid)                 // mid point Left side
		place(siz-(lin+1), mid)         // mid point Right side
		place(mid, mid)                 // mid point
	case 8:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
		place(lin, mid)                 // mid point Left side
		place(siz-(lin+1), mid)         // mid point Right side
		place(mid, lin)                 // mid point Top side
		place(mid, siz-(lin+1))         // mid point Bottom side
	case 9:
		place(siz-(lin+1), lin)         // UpperRight
		place(lin, siz-(lin+1))         // LowerLeft
		place(siz-(lin+1), siz-(lin+1)) // LowerRight
		place(lin, lin)                 // UpperLeft
		place(lin, mid)                 // mid point Left side
		place(siz-(lin+1), mid)         // mid point Right side
		place(mid, lin)                 // mid point Top side
		place(mid, siz-(lin+1))         // mid point Bottom side
		place(mid, mid)                 // mid point
	}
	return pts
}