In chess, assuming that the columns are numbered A to H and the rows are numbered 1 to 8. Write a program to find whether a camel can kill a pawn. Assume that there is nothing else on the chess board.
Input (Position, Position) |
Output (Boolean) |
Camel = C2 and pawn = B3 |
true |
Camel = D4 and pawn = B3 |
false |
Camel = F8 and pawn = F7 |
false |
Camel = H1 and pawn = B7 |
true |