# [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<'0' for i in range(2*p): 	x,y,d=[[[(0,2*p+~i,0),(w+p+~i,h-1,1)][i<w+p],(w-1,i-w,3)][i<p],(i,0,2)][i<w] 	while w>x>=0<=y<h:d^=1+A[y][x];x+=[1,0,0,-1][d];y+=[0,-1,1,0][d] 	print[[y+w,2*p+~y][x<0],[w+p+~x,x][y<h]][0<d<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 `/`.