# Rook Game Problem Solving

Given a $9 \times 25$ chessboard, a rook is placed at the lower left corner. Players A and B take turns moving the rook. A plays first and each turn consists of moving the rook horizontally to the right or vertically above. The last person to make a move wins the game. At the completion of the game, the rook will be at the top right corner. For example, the figure below shows a $3 \times 4$ chessboard and the sequence of moves that leads to a win for player A. Does player A have a winning strategy in the given $9 \times 25$ chessboard? If so, what is the strategy? If not, what is player B's winning strategy?

This is Nim in disguise. You have piles of $8$ and $24$. $A$ can win by symmetry.
In an $n \times m$ game $(n\gt m)$ (the rook begins at $(0,0)$), $A$ has a winning strategy:
On your first move, you go to $(n-m,0)$. The winning strategy is then to end on the diagonal at the end of your turn.
If you play a $n \times n$ game, $B$ has the exact same winning strategy.
In general, the first one the come on a $(n-k,m-k)$ tile wins.