Evaluate a Stratego Battle

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE 
  @1 varchar(2)='3', -- first piece
  @  varchar(2)='B',  -- second piece
  @s varchar(2)=''  -- spotter(only fill this value for spotters)

PRINT IIF(@s>'',IIF(@=@s,@1,@1+','+@),IIF(@1=@,'',IIF(@1+@
IN('S10','3B')or'S'=@,@1,IIF(@='B'or'S'=@1,@,IIF(@1/1<@,@1,@)))))

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results