• R/O
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

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


Commit MetaInfo

修订版23 (tree)
时间2015-07-21 20:40:58
作者bellyoshi

Log Message

更改概述

差异

--- doubutu.UI.tests/BoardTest.vb (revision 22)
+++ doubutu.UI.tests/BoardTest.vb (revision 23)
@@ -58,7 +58,7 @@
5858 '''ToString のテスト
5959 '''</summary>
6060 <TestMethod()> _
61- Public Sub ToStringTest()
61+ Public Sub ToStringTest1()
6262 Dim target As Board = New Board() ' TODO: 適切な値に初期化してください
6363 Dim expected As String = "-KI-LI-ZO" & vbCrLf &
6464 " . -HI . " & vbCrLf &
@@ -86,6 +86,22 @@
8686 Assert.AreEqual(expected, target.ToString)
8787 End Sub
8888
89+ <TestMethod()> _
90+ Public Sub ToStringTest2()
91+ Dim target As Board = New Board()
92+ Dim move1 As New Move("+B3B2HI")
93+ Dim move2 As New Move("-C1B2ZO")
94+ target.DoMove(move1)
95+ target.DoMove(move2)
96+ Assert.AreEqual(1, target.CapturedKomaCount(Koma.GoteHI))
97+ Dim expected As String = "-KI-LI . " & vbCrLf &
98+ " . -ZO . " & vbCrLf &
99+ " . . . " & vbCrLf &
100+ "+ZO+LI+KI" & vbCrLf &
101+ "100100" & vbCrLf &
102+ "-" & vbCrLf
103+ Assert.AreEqual(expected, target.ToString)
104+ End Sub
89105 '''<summary>
90106 '''CapturedKomaCount のテスト
91107 '''</summary>
--- doubutu.UI.Form/Board.vb (revision 22)
+++ doubutu.UI.Form/Board.vb (revision 23)
@@ -157,7 +157,7 @@
157157 Dim capturedPiece As Koma = KomaUtil.CaputringKoma(GetCells(move.ToPos))
158158 If capturedPiece <> Koma.GoteLI AndAlso
159159 capturedPiece <> Koma.SenteLI Then
160- _Capured(CapuredKomaIndex(move.Koma)) += 1
160+ _Capured(CapuredKomaIndex(capturedPiece)) += 1
161161 End If
162162 End If
163163 SetCells(move.ToPos, GetCells(move.FromPos))