static void Main(string[] args) { MessageBox.Show("AIMSサーバー"); var engineConf = new EngineConf(); EntitiesLayer.Implement(engineConf); string filepath = engineConf.GetResourceFullPath("AimsDataSetteiXml"); MessageBox.Show($"設定ファイルパス=[{filepath}]"); // // 設定XMLファイル // SetteiXmlFile setteiXmlFile; { setteiXmlFile = new SetteiXmlFile(filepath); //if (!setteiXmlFile.Exists()) //{ // // ファイルが存在しませんでした。 // // 作ります。 // setteiXmlFile.Write(); //} setteiXmlFile.Read(); // デバッグ //setteiXmlFile.DebugWrite(); } MessageBox.Show($"AIMSサーバー\n将棋エンジン・ファイルパス=[{setteiXmlFile.ShogiEngineFilePath}]"); SkyConst src_Sky = Util_SkyWriter.New_Hirate(Playerside.P1); AimsServerImpl aimsServer = new AimsServerImpl(src_Sky, 0); aimsServer.ShogiEngineFilePath = setteiXmlFile.ShogiEngineFilePath; aimsServer.AtBegin(); aimsServer.AtBody(); }
/// <summary> /// ************************************************************************************************************************ /// 起動直後の流れです。 /// ************************************************************************************************************************ /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Uc_Form1Main_Load(object sender, EventArgs e) { Uc_Form2Main uc_Form2Main = ((Form1_Shogi)this.ParentForm).Form2_Console.Uc_Form2Main; // // 設定XMLファイル // { this.setteiXmlFile = new SetteiXmlFile(this.MainGui.EngineConf.GetResourceBasename("DataSetteiXml")); if (!this.SetteiXmlFile.Exists()) { // ファイルが存在しませんでした。 // 作ります。 this.SetteiXmlFile.Write(); } this.SetteiXmlFile.Read(); // デバッグ this.SetteiXmlFile.DebugWrite(); } //---------- // 棋譜 //---------- // // 先後や駒など、対局に用いられる事柄、物を事前準備しておきます。 // //---------- // 駒の並べ方 //---------- // // 平手に並べます。 // { this.MainGui.Link_Server.Model_Taikyoku.Kifu.Clear(); // 棋譜を空っぽにします。 this.MainGui.Link_Server.Model_Taikyoku.Kifu.SetProperty(Word_KifuTree.PropName_Startpos, "startpos"); //平手の初期局面 Playerside firstPside = Playerside.P1; //Playerside.P2 this.MainGui.Model_Manual.SetGuiSky( Util_SkyWriter.New_Hirate(firstPside) //起動直後 ); //this.ShogiGui.Model_PnlTaikyoku.Kifu.SetProperty(Word_KifuTree.PropName_FirstPside, Playerside.P1); } // 全駒の再描画 this.MainGui.RepaintRequest = new RepaintRequestImpl(); this.MainGui.RepaintRequest.SetFlag_RecalculateRequested(); //---------- // フェーズ //---------- this.MainGui.SetScene(SceneName.SceneB_1TumamitaiKoma); //---------- // 監視 //---------- this.gameEngineTimer1.Start(); //---------- // 将棋エンジンが、コンソールの振りをします。 //---------- // // このメインパネルに、コンソールの振りをさせます。 // 将棋エンジンがあれば、将棋エンジンの入出力を返すように内部を改造してください。 // TextboxListener.SetTextboxListener( uc_Form2Main.ReadText, uc_Form2Main.WriteLine_Syuturyoku); //---------- // 画面の出力欄 //---------- // // 出力欄(上下段)を空っぽにします。 // uc_Form2Main.WriteLine_Syuturyoku(""); this.MainGui.Response("Launch"); // これで、最初に見える画面の準備は終えました。 // あとは、操作者の入力を待ちます。 }