From a9378b57858ee3b334b9a258873bd52137d22e43 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 29 Aug 2022 21:01:02 +0200 Subject: Fixed game reset --- src/game.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game.zig') 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(); -- cgit v1.2.3