# Two moves mate

**Logic**Level 3

It is black turn, black can perform checkmate in two moves. What is the first move that black should do? Both players play optinally.

The first move can be written as \( P(x_{1} y_{1})-(x_{2}, y_{2}) \) where P is the piece that should be moved. \( (x_{1}, y_{1}) \) is the initial position of the piece and \( (x_{2}, y_{2}) \) is the position of the piece after move.

Evaluate \( val(P) \times (y_{1} + y_{2}) \)

**Details and Assumptions**

The coordinate system follows the one in the picture. \( a = 1, b = 2 , \ldots h = 8 \)

Both rooks from column a have not been moved.

- \( Val(P) \) iss the value of the piece, following these:

\( Val(King) = 0 \)

\( Val(Queen) = 9 \)

\( Val(Rook) = 5 \)

\( Val(Knight) = 3 \)

\( Val(Bishop) = 3 \)

\( Val(Pawn) = 1 \).