Evaluate a Stratego Battle In the game Stratego, the main game mechanic is when you attack an opponent's piece with yours. In this challenge, you job is to simulate one of these battles and say who survives.
Specs
You will get as input a pair of string representing Stratego pieces. The pieces are one of &quot;S 1 2 3 4 5 6 7 8 9 10 B&quot; (S is the Spy, and B are bombs). The first of the pair will be the attacker, and the second the attacked.
Here are the rules for determining the results of a battle:

The higher number beats the lower number: [&quot;4&quot;, &quot;6&quot;] -&gt; [&quot;6&quot;].
If both are the same, then both die: [&quot;7&quot;, &quot;7&quot;] -&gt; [].
Spies are at the bottom, underneath even 1: [&quot;S&quot;, &quot;2&quot;] -&gt; [&quot;2&quot;].
However, if a spy attacks the 10, then the spy wins: [&quot;S&quot;, &quot;10&quot;] -&gt; [&quot;S&quot;].
But the normal rules still apply if the 10 is the one attacking: [&quot;10&quot;, &quot;S&quot;] -&gt; [&quot;10&quot;].
If anything attacks a bomb, the bomb wins: [&quot;5&quot;, &quot;B&quot;] -&gt; [&quot;B&quot;].
However, a miner (a 3), can defuse a bomb: [&quot;3&quot;, &quot;B&quot;] -&gt; [&quot;3&quot;].
A bomb will never be the attacker.
A spotter (a 1), can attack using the normal mechanism, but they can also try to &quot;guess&quot; the rank of the other player, which can be denoted with any sane notation.
If they guess correctly, the other piece dies: [&quot;1(5)&quot;, &quot;5&quot;] -&gt; [&quot;1&quot;].
If they guess wrong, nothing happens: [&quot;1(3)&quot;, &quot;5&quot;] -&gt; [&quot;1&quot;, &quot;5&quot;].
Spotters can spot bombs: [&quot;1(B)&quot;, &quot;B&quot;] -&gt; [&quot;1&quot;].

This is code-golf, so shortest code in bytes wins!
(You can use the examples up there as test-cases, because I'm too lazy to put them all together in one list).
Haskell, 131 bytes

This solution is in the form of an infix function # with type String -&gt; String -&gt; String

Input is accepted through the two string arguments. The format for spotter input is 1 x where x is the guess.Output is given as a string. In the case where both units survive, the returned string contains both separated by a space.

My original solution was unfortunately bugged and the fix cost me a few bytes. 

('1':' ':x)#y|x==y="1"|1&gt;0="1 "++y
"S"#"10"="S"
"3"#"B"="3"
_#"B"="B"
x#y|x==y=[]
t@"10"#_=t
_#t@"10"=t
"S"#x=x
x#"S"=x
x#y=max x y