/o\
Jimmy has been receiving a lot of attention on this site recently and it has caused Jimmy to get a little stressed. The bodybuilder Jimmys /-o-\
started bad mouthing the OG / acrobat /o\
Jimmys saying they are way cooler because they are bigger. But of course the acrobat Jimmys thinks they are way cooler since after all they were the original.
This tension between Jimmys has resulted in somewhat of a Jimmy war, the acrobat Jimmys and the bodybuilder Jimmys are no longer at peace.
Objective
Given a string of acrobat and bodybuilder Jimmys, determine would would win the battle.
The input string will only contain bodybuilder Jimmys
/-o-\
, acrobat Jimmys/o\
and spacesThe bodybuilder Jimmys are stronger than acrobat Jimmys, so one bodybuilder Jimmy can take down 2 acrobat Jimmys BUT he will be taken down himself after the second Jimmy
/o\ /-o-\
->/-o-\
/o\ /o\ /-o-\
->The acrobat Jimmys are crafty and are good at surrounding the bodybuilder Jimmys, if 2 acrobat Jimmys surround a bodybuilder Jimmy, the bodybuilder Jimmy will be defeated with no damage to the acrobat Jimmys
/o\ /-o-\ /o\
->/o\ /o\
The acrobat Jimmys are also faster than the bodybuilder Jimmys so their actions will occur before the bodybuilder Jimmys
/o\ /-o-\ /o\ /-o-\
->/o\ /o\ /-o-\
->
Notes
- Whitespace between Jimmys will have no affect on the battle, but it can be expected in the input.
- Whitespace in the output is acceptable and will be ignored as long as no Jimmys get cut in half
- Whitespace will only be spaces, you can assume there will be no tabs or newlines
- All Jimmys in the input will be whole, there will be no partial Jimmys
/o
- The battle will continue until only 1 type of Jimmy (or no Jimmys at all) remain
- Both input and output should be in the form of a string
- Jimmy actions will occur going left -> right across the field, but acrobat Jimmys have priority to bodybuilder Jimmy
- Bodybuilder Jimmys will only go down to two Jimmys if it occurs on the same turn (see last example)
More Examples
/o\ /o\ /-o-\ /-o-\ /o\ /o\ // Input string
/-o-\ /o\ /o\ // Leftmost bodybuilder took out left two acrobats
// Output will be whitespace
-----------------------------------
/o\ /o\ /-o-\ /o\ /-o-\ /o\ /o\ // Input string
/o\ /o\ /o\ /-o-\ /o\ /o\ // acrobat Jimmys got a surround
/o\ /o\ /o\ /o\ /o\ // acrobat Jimmys win
-----------------------------------
/o\ /o\ /-o-\ /o\ /-o-\ /-o-\ /o\ /o\ // Input string
/o\ /o\ /o\ /-o-\ /-o-\ /o\ /o\
/o\ /-o-\ /o\ /o\
/o\ /o\ /o\ // acrobats win again
-----------------------------------
/o\ /o\ /-o-\ /o\ /-o-\ /-o-\ /o\ /-o-\ // Input string
/o\ /o\ /o\ /-o-\ /-o-\ /o\ /-o-\
/o\ /-o-\ /o\ /-o-\
/o\ /o\ /-o-\
// Output is empty
-----------------------------------
/-o-\ /o\ /o\ /o\ /-o-\ /-o-\ // Input string
/o\ /-o-\ /-o-\
/-o-\ /-o-\ // Bodybuilder Jimmys win
-----------------------------------
/o\ /-o-\ /-o-\ /o\ /o\ /o\ // Input string
/-o-\ /-o-\ /o\ /o\ /o\ // left most bb jimmy took out leftmost acrobat jimmy
/-o-\ /o\ // right bb Jimmy took out left two acrobat Jimmys and himself
/-o-\ // leftmost jimmy took out a second jimmy but survives because it occurred on a different turn the the first jimmy he took out - bodybuilder Jimmys win
Standard rules apply, This is code-golf so may the shortest answer win!