• R/O
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

どうぶつしょうぎの完全解析をするGUI


コミットメタ情報

リビジョン29 (tree)
日時2015-07-22 17:12:22
作者bellyoshi

ログメッセージ

変更サマリ

差分

--- doubutu.UI.Form/frmMain.Designer.vb (revision 28)
+++ doubutu.UI.Form/frmMain.Designer.vb (revision 29)
@@ -29,8 +29,9 @@
2929 Me.btnUndo = New System.Windows.Forms.Button()
3030 Me.btnNext = New System.Windows.Forms.Button()
3131 Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
32+ Me.chkRotated = New System.Windows.Forms.CheckBox()
3233 Me.BoardViewer1 = New doubutu.UI.Form.Control.Board.BoardViewer()
33- Me.chkRotated = New System.Windows.Forms.CheckBox()
34+ Me.btnBestMove = New System.Windows.Forms.Button()
3435 Me.SuspendLayout()
3536 '
3637 'btnAnalyze
@@ -81,6 +82,16 @@
8182 'BackgroundWorker1
8283 '
8384 '
85+ 'chkRotated
86+ '
87+ Me.chkRotated.AutoSize = True
88+ Me.chkRotated.Location = New System.Drawing.Point(528, 59)
89+ Me.chkRotated.Name = "chkRotated"
90+ Me.chkRotated.Size = New System.Drawing.Size(59, 19)
91+ Me.chkRotated.TabIndex = 6
92+ Me.chkRotated.Text = "反転"
93+ Me.chkRotated.UseVisualStyleBackColor = True
94+ '
8495 'BoardViewer1
8596 '
8697 Me.BoardViewer1.IsBoardViewRotated = False
@@ -90,15 +101,14 @@
90101 Me.BoardViewer1.Size = New System.Drawing.Size(774, 544)
91102 Me.BoardViewer1.TabIndex = 3
92103 '
93- 'chkRotated
104+ 'btnBestMove
94105 '
95- Me.chkRotated.AutoSize = True
96- Me.chkRotated.Location = New System.Drawing.Point(528, 59)
97- Me.chkRotated.Name = "chkRotated"
98- Me.chkRotated.Size = New System.Drawing.Size(59, 19)
99- Me.chkRotated.TabIndex = 6
100- Me.chkRotated.Text = "反転"
101- Me.chkRotated.UseVisualStyleBackColor = True
106+ Me.btnBestMove.Location = New System.Drawing.Point(886, 12)
107+ Me.btnBestMove.Name = "btnBestMove"
108+ Me.btnBestMove.Size = New System.Drawing.Size(137, 23)
109+ Me.btnBestMove.TabIndex = 7
110+ Me.btnBestMove.Text = "最善手を着手"
111+ Me.btnBestMove.UseVisualStyleBackColor = True
102112 '
103113 'frmMain
104114 '
@@ -105,6 +115,7 @@
105115 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
106116 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
107117 Me.ClientSize = New System.Drawing.Size(1272, 672)
118+ Me.Controls.Add(Me.btnBestMove)
108119 Me.Controls.Add(Me.chkRotated)
109120 Me.Controls.Add(Me.btnNext)
110121 Me.Controls.Add(Me.btnUndo)
@@ -126,5 +137,6 @@
126137 Friend WithEvents btnNext As System.Windows.Forms.Button
127138 Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
128139 Friend WithEvents chkRotated As System.Windows.Forms.CheckBox
140+ Friend WithEvents btnBestMove As System.Windows.Forms.Button
129141
130142 End Class
--- doubutu.UI.Form/frmMain.vb (revision 28)
+++ doubutu.UI.Form/frmMain.vb (revision 29)
@@ -70,4 +70,21 @@
7070 BoardViewer1.IsBoardViewRotated = chkRotated.Checked
7171 BoardViewer1.DrawCurrentBitmap()
7272 End Sub
73+
74+ Private Sub btnBestMove_Click(sender As System.Object, e As System.EventArgs) Handles btnBestMove.Click
75+ Dim lines As String() = output.Split(vbLf)
76+ Dim bestMoveCode As String = String.Empty
77+ For Each line As String In lines
78+ If line.StartsWith("Move") Then
79+ bestMoveCode = line.Substring(7, 7)
80+ Exit For
81+ End If
82+ Next
83+ If bestMoveCode <> String.Empty Then
84+ Dim move As Move = New Move(bestMoveCode)
85+ BoardViewer1.kyokumen.DoMove(move)
86+ BoardViewer1.DrawCurrentBitmap()
87+ BackgroundWorker1.RunWorkerAsync()
88+ End If
89+ End Sub
7390 End Class