image thumbnail
from Warless Terrain by Krishna Lalith
Swap the coins/pegs to occupy opponents’ terrain without any war between two teams.

[win]=Check_Status(WrTr)
function [win]=Check_Status(WrTr)

win=0;

count=0;
for ii=1:8,
    if WrTr(ii)<0
        count=count+1;    
    end
end
if count==8,  win=-1;  end    

count=0;
for ii=10:17,
    if WrTr(ii)>0
        count=count+1;    
    end
end
if count==8,  win=1;  end 

Contact us at files@mathworks.com