diff options
author | Julien Dessaux | 2022-08-29 21:01:02 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-08-29 21:01:02 +0200 |
commit | a9378b57858ee3b334b9a258873bd52137d22e43 (patch) | |
tree | 4cc3a7156050f6690450c4a0dfecece5476ea0aa | |
parent | Began adding scoring (diff) | |
download | grenade-brothers-a9378b57858ee3b334b9a258873bd52137d22e43.tar.gz grenade-brothers-a9378b57858ee3b334b9a258873bd52137d22e43.tar.bz2 grenade-brothers-a9378b57858ee3b334b9a258873bd52137d22e43.zip |
Fixed game reset
Diffstat (limited to '')
-rw-r--r-- | src/game.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.zig b/src/game.zig index 40804b2..7f44856 100644 --- a/src/game.zig +++ b/src/game.zig @@ -33,12 +33,14 @@ pub const Game = struct { } pub fn reset(self: *Game, side: brothers.Side) void { self.side = side; + self.brothers[0].reset(.left); + self.brothers[1].reset(.right); self.resetRound(); } pub fn resetRound(self: *Game) void { self.ball.reset(.left); - self.brothers[0].reset(.left); - self.brothers[1].reset(.right); + self.brothers[0].resetRound(); + self.brothers[1].resetRound(); } pub fn step(self: *Game) void { self.ball.step(); |