func boardMode(filename string, level_str string) error { level, err := strconv.Atoi(level_str) if err != nil { return err } rand.Seed(time.Now().UTC().UnixNano()) kif, err := kifu.LoadAuto(filename) if err != nil { return err } b := NewNode() b.Board = *kif.Board() b.ProgressCommands(kif.Commands()) fmt.Println(b) //watcher := NewWatcher() history, point, param := Solv(b, level, -b.Teban.Dir(), *parallel) fmt.Println(history) fmt.Printf("COM: %s POINT: %d COUNT:%d\n", history[0], point, param.Count) b.Progress(history[0]) // fmt.Println( b ) return nil }
func pointMode(filename string) error { flag_set := flag.NewFlagSet("", flag.ExitOnError) _ = flag_set kif, err := kifu.LoadAuto(filename) if err != nil { return err } n := NewNode() n.Board = *kif.Board() for i, com := range kif.Commands() { n.Progress(com) kiki := calcKiki(n) fmt.Printf("%2d手目 koma:%5d kiki:%5d\n", i+1, calcKomaPoint(n), CalcKikiPoint(n, kiki)) fmt.Println(n) } return nil }