Here is how I worked through Ruby Warrior Level 7.
There is only one small change in this level, our warrior starts out facing the wall. First, we need to see if we are up against the wall, and if so, pivot around. Since there are no captives in this level, we can take out the code we wrote for captives and just first pivot, then walk forward. There is no need to walk backward in this level. We can set the @direction instance variable to :forward !
Another change I made is to change min_health to 10 instead of 15. I can do this because when the warrior faces the sludge, he is at full health at 20. Later, only 10 health points is needed to start walking toward the archer. The archer can only attack 3 times before being beaten (includes shooting from afar and attacking when the warrior is right in front). Each time, the archer inflicts -3 damage, so we need at least 10 health points before entering into the archer’s range.