From 63029a3a27eb3ae44d802cb17b0c453e84595ade Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 23 Sep 2022 19:09:28 +0200 Subject: Added ball physics --- src/game.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game.zig') diff --git a/src/game.zig b/src/game.zig index 2f3dfcd..01e3dc4 100644 --- a/src/game.zig +++ b/src/game.zig @@ -12,9 +12,9 @@ pub const Game = struct { playerSide: utils.side = undefined, pub fn draw(self: *Game) void { - self.ball.draw(); self.brothers[0].draw(); self.brothers[1].draw(); + self.ball.draw(); // draw the net w4.DRAW_COLORS.* = 0x42; w4.rect(78, 100, 4, 61); @@ -34,5 +34,6 @@ pub const Game = struct { self.gamepads[1].update(w4.GAMEPAD2.*); self.brothers[0].update(self.gamepads[0]); self.brothers[1].update(self.gamepads[1]); + self.ball.update(); } }; -- cgit v1.2.3