diff options
-rw-r--r-- | src/game.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game.zig b/src/game.zig index 9b8086d..ce98eef 100644 --- a/src/game.zig +++ b/src/game.zig @@ -33,7 +33,11 @@ pub const Game = struct { self.resetRound(); } pub fn resetRound(self: *Game) void { - self.ball.resetRound(.left); + if ((self.brothers[0].score + self.brothers[1].score) % 2 == 0) { + self.ball.resetRound(.left); + } else { + self.ball.resetRound(.right); + } self.brothers[0].resetRound(); self.brothers[1].resetRound(); } |