• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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


Commit MetaInfo

Revision32 (tree)
Time2015-07-22 17:53:00
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- doubutu.UI.Form/Move.vb (revision 31)
+++ doubutu.UI.Form/Move.vb (revision 32)
@@ -80,6 +80,14 @@
8080 Return False
8181 End Function
8282
83+ ''' <summary>
84+ ''' なったか
85+ ''' </summary>
86+ ''' <value></value>
87+ ''' <returns></returns>
88+ ''' <remarks></remarks>
89+ Public Property IsPromote As Boolean
90+
8391 Public Shared Operator =(ByVal op1 As Move, ByVal op2 As Move)
8492 Return op1.ToString = op2.ToString
8593 End Operator
--- doubutu.UI.Form/Board.vb (revision 31)
+++ doubutu.UI.Form/Board.vb (revision 32)
@@ -235,7 +235,12 @@
235235 _Capured(CapuredKomaIndex(capturedPiece)) -= 1
236236 End If
237237 SetCells(move.ToPos, move.CapturedPiece)
238- SetCells(move.FromPos, move.Koma)
238+ If move.IsPromote Then
239+ SetCells(move.FromPos, move.Koma - 1) 'にわとりをヒヨコに変換
240+ Else
241+ SetCells(move.FromPos, move.Koma)
242+ End If
243+
239244 End If
240245 _side = -_side
241246 End Sub
@@ -253,7 +258,10 @@
253258 move.CapturedPiece = GetCells(move.ToPos)
254259 End If
255260 End If
256- SetCells(move.ToPos, GetCells(move.FromPos))
261+ If move.Koma <> GetCells(move.FromPos) Then
262+ move.IsPromote = True
263+ End If
264+ SetCells(move.ToPos, move.Koma)
257265 SetCells(move.FromPos, Koma.Empty)
258266 End If
259267 End Sub