/// <summary> /// 次の棋譜をランダムに選んでセット。 /// </summary> public void Do_NextKifuSet( out bool out_isEmptyKifu, ref bool ref_isRequest_ShowGohosyu, ref bool ref_isRequest_ChangeKyokumenPng ) { // // 前対局の情報のクリアー // { this.txtIttesasuLog.Text = ""; } // // ランダム・棋譜選択 // string kifuFilepath = this.GetRandamKifuFilepath_OrEmpty(); if ("" != kifuFilepath) { Util_LearnOperation.Do_OpenCsaKifu( ref ref_isRequest_ShowGohosyu, ref ref_isRequest_ChangeKyokumenPng, kifuFilepath, this); out_isEmptyKifu = false; } else { out_isEmptyKifu = true; } }
public static void Do_OpenCsaKifu( ref bool isRequest_ShowGohosyu, ref bool isRequest_ChangeKyokumenPng, string kifuFilepath, Uc_Main uc_Main) { uc_Main.TxtKifuFilepath.Text = kifuFilepath; // 平手初期局面の棋譜ツリーを準備します。 Util_LearnOperation.Setup_KifuTree( ref isRequest_ShowGohosyu, ref isRequest_ChangeKyokumenPng, uc_Main); // 処理が重いので。 Application.DoEvents(); // CSA棋譜を読み込みます。 Util_LearnOperation.Load_CsaKifu(uc_Main); // 合法手を調べます。 uc_Main.LearningData.Aa_Yomi(uc_Main.LearningData.Kifu.CurNode.Key); // ノード情報の表示 Util_LearningView.Aa_ShowNode2(uc_Main.LearningData, uc_Main); //gt_EndMethod: // ; }
/// <summary> /// 初期局面の評価値を 0 点にするようにFVを調整します。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnStartZero_Click(object sender, EventArgs e) { bool isRequest_ShowGohosyu = false; Util_LearnOperation.Do_ZeroStart(ref isRequest_ShowGohosyu, this); if (isRequest_ShowGohosyu) { // 合法手一覧を更新 Util_LearnFunctions.FvParamRange_PP(this.LearningData.Fv);// 自動で -999~999(*bairitu) に矯正。 Util_LearningView.Aa_ShowGohosyu2(this.LearningData, this); isRequest_ShowGohosyu = false; } }
private void btnOpenCsa_Click(object sender, EventArgs e) { bool isRequest_ShowGohosyu = false; bool isRequest_ChangeKyokumenPng = false; string kifuFilepath = ""; { this.OpenCsaFileDialog1.InitialDirectory = Path.GetDirectoryName(Application.StartupPath); DialogResult result = this.OpenCsaFileDialog1.ShowDialog(); switch (result) { case DialogResult.OK: kifuFilepath = this.OpenCsaFileDialog1.FileName; break; default: break; } } if ("" != kifuFilepath) { Util_LearnOperation.Do_OpenCsaKifu( ref isRequest_ShowGohosyu, ref isRequest_ChangeKyokumenPng, kifuFilepath, this); } if (isRequest_ShowGohosyu) { // 合法手一覧を更新 Util_LearnFunctions.FvParamRange_PP(this.LearningData.Fv);// 自動で -999~999(*bairitu) に矯正。 Util_LearningView.Aa_ShowGohosyu2(this.LearningData, this); isRequest_ShowGohosyu = false; } if (isRequest_ChangeKyokumenPng) { this.LearningData.ChangeKyokumenPng(this); isRequest_ChangeKyokumenPng = false; } }
/// <summary> /// FIXME: 未実装 /// 指し手の順位上げ。 /// </summary> public static void DoRankUpMove( ref bool isRequest_ShowGohosyu, ref bool isRequest_ChangeKyokumenPng, Uc_Main uc_Main) { // 評価値変化量 float chosei_bairitu; float.TryParse(uc_Main.TxtChoseiBairituB.Text, out chosei_bairitu); if (Playerside.P2 == uc_Main.LearningData.Kifu.CurNode.Value.KyokumenConst.KaisiPside) { chosei_bairitu *= -1; //後手はマイナスの方が有利。 } Util_LearnOperation.ARankUpSelectedMove(uc_Main, chosei_bairitu); // 現局面の合法手表示の更新を要求 isRequest_ShowGohosyu = true; // 局面PNG画像更新を要求 isRequest_ChangeKyokumenPng = true; }
/// <summary> /// [指し手の順位上げ]ボタン。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnMoveRankUp_Click(object sender, EventArgs e) { bool isRequest_ShowGohosyu = false; bool isRequest_ChangeKyokumenPng = false; Util_LearnOperation.DoRankUpMove( ref isRequest_ShowGohosyu, ref isRequest_ChangeKyokumenPng, this); if (isRequest_ShowGohosyu) { // 合法手一覧を更新 Util_LearnFunctions.FvParamRange_PP(this.LearningData.Fv);// 自動で -999~999(*bairitu) に矯正。 Util_LearningView.Aa_ShowGohosyu2(this.LearningData, this); isRequest_ShowGohosyu = false; } if (isRequest_ChangeKyokumenPng) { this.LearningData.ChangeKyokumenPng(this); isRequest_ChangeKyokumenPng = false; } }
/// <summary> /// 二駒評価値を調べるボタン。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSiraberuHyokatiNikoma_Click(object sender, EventArgs e) { Util_LearnOperation.Do_ShowNikomaHyokati(this); }
/// <summary> /// fv.csvを開くボタン。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOpenFvCsv_Click(object sender, EventArgs e) { Util_LearnOperation.Do_OpenFvCsv(this); }