We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ae8cc3 commit ef6b81dCopy full SHA for ef6b81d
examples/breakout/breakout.v
@@ -218,7 +218,7 @@ fn (mut g Game) update() {
218
// Brick collisions
219
for mut brick in g.bricks {
220
if brick.alive && g.ball_y - g.ball_r < brick.y + brick.h && g.ball_y + g.ball_r > brick.y
221
- && g.ball_x > brick.x && g.ball_x < brick.x + brick.w {
+ && g.ball_x + g.ball_r > brick.x && g.ball_x - g.ball_r < brick.x + brick.w {
222
g.play(.brick)
223
brick.alive = false
224
g.nbricks--
0 commit comments