0
I'm trying to solve in Ruby the problem named 'Security'. What's wrong with my code? It fails on one of the test cases.
Casino Security https://code.sololearn.com/cvYtb474RcHh/?ref=app
2 ответов
+ 5
It's possible that ther is more than 1 or multiple of each of the Guards, Thieves, or $.
You don't really need to use regex at all for this challenge. You could use the gsub() method to simply remove all the x from the floor and then check with the
include?() method for the presence of "Tquot; or "$T" remaining in the string.
+ 1
There is 1 thief, 1 $ and any number of guards.
Ok, good advice i just wanted to try regexps...Thank you.