A soldier will emerge from the left, so you can attack with a ranged weapon, but, there's little point in doing so because as soon as you go to cross the planks, they'll give way and throw you down ...
use FEN::Grammar; my $fen = 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1'; my $match = FEN::Grammar.parse($fen); State is optional, if given fen ...
Detect if there exists any chess board in the image Get a bounding box of the (most prominent) chess board Check if the board image is rotated by 0, 90, 180, or 270 degrees Finally detect the FEN by ...