Cody

Solution 2190563

Submitted on 3 Apr 2020 by Atsushi Ueno
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(en_passant('b2','c3'),1))

c1 = logical 1 c2 = logical 0 c3 = logical 0

2   Pass
assert(isequal(en_passant('a2','a3'),1))

c1 = logical 1 c2 = logical 0 c3 = logical 0

3   Pass
assert(isequal(en_passant('d3','d5'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

4   Pass
assert(isequal(en_passant('e5','d4'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

5   Pass
assert(isequal(en_passant('e5','c6'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

6   Pass
assert(isequal(en_passant('e5','d6'),1))

c1 = logical 1 c2 = logical 0 c3 = logical 0

7   Pass
assert(isequal(en_passant('b2','b4'),1))

c1 = logical 0 c2 = logical 1 c3 = logical 0

8   Pass
assert(isequal(en_passant('b2','c2'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

9   Pass
assert(isequal(en_passant('a1','a2'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

10   Pass
assert(isequal(en_passant('g7','g8'),1))

c1 = logical 1 c2 = logical 0 c3 = logical 0

11   Pass
assert(isequal(en_passant('g7','g6'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

12   Pass
assert(isequal(en_passant('f5','h6'),0))

c1 = logical 0 c2 = logical 0 c3 = logical 0

Suggested Problems

More from this Author145