# [Whython](https://github.com/pxeger/whython), 59 bytes

<pre><code class="lang-python">f=lambda F,a,b,x=0,y=0:F[y][x%len(F[0])]+f(F,a,b,x+b,y+a)?0</code></pre>

[Attempt This Online!](https://ato.pxeger.com/run?1=ZVFBasMwECRXvcJIBCS8FXZ8aHER6cmfUHWwSZwYVCXELrHfkksuoW9qXxMpkhOTCnaZHWZntdLp57gduu3OnM-X765-eft9r4Uuv6pVGRVQQgW9SGAQSV7IQcl-rteGFjJRTMU1DYq4giEu2TLxFn-zj83o0eZS9kJgguvdIeqjxkRaOagdbHm7102nG7NuKVNof2hMR61vLjYUY_yJOCGIcBuEI0swSCFl7CGExVOdQjatH0bWifuDHAiBbsAlO8AlzxPPkwnvu9FN4ntCr8dBQe7-E83oGRbIni78-n8h_5Djn1wB)

Inputs a 2D array of booleans, and 2 integers