There's a coordinate-based solution in the source code issues. I couldn't elucidate that notation either.

https://github.com/Rowan441/1d-chess/issues/1

Edit: There's a second solution where instead of moving the rook back 2, move the king forward one and the take the black knight with the rook as the checkmate move.