From ec710626a9b61693a44e333518fee2703c46f8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Tue, 25 Mar 2025 11:06:22 +0100 Subject: [PATCH] Pygame --- README.md | 2 +- index.html | 2 +- parse.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d6c9813..ea4105c 100644 --- a/README.md +++ b/README.md @@ -3124,7 +3124,7 @@ def draw(screen, images, mario, tiles): screen.fill((85, 168, 255)) mario.facing_left = mario.spd.x < 0 if mario.spd.x else mario.facing_left is_airborne = D.s not in get_boundaries(mario.rect, tiles) - image_index = 4 if is_airborne else (next(mario.frame_cycle) if mario.spd.x else 6) + image_index = 4 if is_airborne else next(mario.frame_cycle) if mario.spd.x else 6 screen.blit(images[image_index + (mario.facing_left * 9)], mario.rect) for t in tiles: is_border = t.x in [0, (W-1)*16] or t.y in [0, (H-1)*16] diff --git a/index.html b/index.html index ef3106d..04a972c 100644 --- a/index.html +++ b/index.html @@ -2568,7 +2568,7 @@ W, H, MAX_S = 50, 50< screen.fill((85, 168, 255)) mario.facing_left = mario.spd.x < 0 if mario.spd.x else mario.facing_left is_airborne = D.s not in get_boundaries(mario.rect, tiles) - image_index = 4 if is_airborne else (next(mario.frame_cycle) if mario.spd.x else 6) + image_index = 4 if is_airborne else next(mario.frame_cycle) if mario.spd.x else 6 screen.blit(images[image_index + (mario.facing_left * 9)], mario.rect) for t in tiles: is_border = t.x in [0, (W-1)*16] or t.y in [0, (H-1)*16] diff --git a/parse.js b/parse.js index a2d74d5..aebd7e9 100755 --- a/parse.js +++ b/parse.js @@ -302,7 +302,7 @@ const MARIO = ' screen.fill((85, 168, 255))\n' + ' mario.facing_left = mario.spd.x < 0 if mario.spd.x else mario.facing_left\n' + ' is_airborne = D.s not in get_boundaries(mario.rect, tiles)\n' + - ' image_index = 4 if is_airborne else (next(mario.frame_cycle) if mario.spd.x else 6)\n' + + ' image_index = 4 if is_airborne else next(mario.frame_cycle) if mario.spd.x else 6\n' + ' screen.blit(images[image_index + (mario.facing_left * 9)], mario.rect)\n' + ' for t in tiles:\n' + ' is_border = t.x in [0, (W-1)*16] or t.y in [0, (H-1)*16]\n' +