# [Python 2], <s>317</s> <s>300</s> <s>298</s> 290 bytes

<!-- language-all: lang-python -->

<pre><code>def f(w,h,B):
 A=[w*[-1]for c in' '*h];p=w+h
 for x,y,c in B:A[y][x]=c&lt;'0'
 for i in range(2*p):
&#9;x,y,d=[[[(0,2*p+~i,0),(w+p+~i,h-1,1)][i&lt;w+p],(w-1,i-w,3)][i&lt;p],(i,0,2)][i&lt;w]
&#9;while w&gt;x&gt;=0&lt;=y&lt;h:d^=1+A[y][x];x+=[1,0,0,-1][d];y+=[0,-1,1,0][d]
&#9;print[[y+w,2*p+~y][x&lt;0],[w+p+~x,x][y&lt;h]][0&lt;d&lt;3],
</code></pre>

[Try it online!][TIO-k1pn2n70]

[Python 2]: https://docs.python.org/2/
[TIO-k1pn2n70]: https://tio.run/##TZBRb4IwFIWf5Vect6Jcs7aAolIT/Rtdlywig2RBYkwKL/vr7AKbW9Lc9Hz33JvTtv2jujV6GIpriTL0VNF5uQ9wMtav7Fq58nbHBXUjIFaVO7TGR1WAkXbU09jBeX@yvbOdM5dcSDF367Fzf28@rqFetbxyMfoLY60NJTGKvmqSSwp9NF2rtSK1dLbOGTjGrOu1p3hiI2E76dnhgoWv6s8r/LE7GpmbPq/2xZtR0U@SQxcZq3hAEr/BFu7QMxgFMR1BsGjvdfOwto/8HGcczKUjOyXqqHOW1zpnZV7ksaPhbGyoCJogXsSSEKaE5Ck2BPkUera9vv76/qnsT7kgKEMlKeVPD6Y8c4XQCTQUNB8JzVcJtYVKoFJsoDMorhtk2EFpbKF30CkSxEiht2A3N2LoGEpBZWL4Bg "Python 2 – Try It Online"

Takes the bumpers as a list of tuples `(x,y,c)`where `x` and `y` are the coordinates of the bumper and `c` is either `\` or `/`.