Nice! It makes me wonder if we could set this up using a generating function. Where the power of, say, x would be the column and the power of y would be the row (the coordinates). The coefficient would be the army (1 or 2 in this case).
Your first picture with the yet unknown generating function
GetSolutionGF[5, 4, 2] would have output 1XY+1X^5 Y+2X^3 Y^2 +2X^2 Y^3+2X^4 Y^3+2X^3 Y^4+1X Y^5+1X^5 Y^5.