Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8996a13

Browse files
author
openset
committed
Add: test case
1 parent 4485d63 commit 8996a13

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎problems/available-captures-for-rook/available_captures_for_rook_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ func TestNumRookCaptures(t *testing.T) {
4848
},
4949
expected: 3,
5050
},
51+
{
52+
input: [][]byte{
53+
{'.', '.', '.', '.', '.', '.', '.', '.'},
54+
{'.', '.', '.', 'p', '.', '.', '.', '.'},
55+
{'.', '.', '.', 'p', '.', '.', '.', '.'},
56+
{'p', 'B', '.', 'R', '.', 'p', 'B', '.'},
57+
{'.', '.', '.', '.', '.', '.', '.', '.'},
58+
{'.', '.', '.', '.', '.', '.', '.', '.'},
59+
{'.', '.', 'p', '.', 'p', '.', '.', '.'},
60+
{'.', '.', '.', '.', '.', '.', '.', '.'},
61+
},
62+
expected: 2,
63+
},
5164
}
5265
for _, tc := range tests {
5366
output := numRookCaptures(tc.input)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /