From 3c5acf62518372df62137f3273153db44a268654 Mon Sep 17 00:00:00 2001 From: renderman21 <84398061+renderman21@users.noreply.github.com> Date: Tue, 22 Jun 2021 15:48:20 +0800 Subject: [PATCH 1/2] Fixes typo Apparently, there is a dot (.), and it doesn't run properly. --- main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index a4256fa..1d5a5b1 100644 --- a/main.py +++ b/main.py @@ -1,12 +1,12 @@ import pygame, sys, time, random, colorsys, math from pygame.math import Vector2 from pygame.locals import * -from .player import Player -from .background import Background -from .button import Button -from .bean import Bean -from .utils import clamp -from .utils import checkCollisions +from player import Player +from background import Background +from button import Button +from bean import Bean +from utils import clamp +from utils import checkCollisions def main(): From 5c3a74b1fbae5149e21efb2c8eb220651a8d19bd Mon Sep 17 00:00:00 2001 From: renderman21 <84398061+renderman21@users.noreply.github.com> Date: Tue, 22 Jun 2021 15:50:39 +0800 Subject: [PATCH 2/2] Add "colorsys" in import There is a colorsys in line 9 and it needs to be defined properly. --- background.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background.py b/background.py index 097a092..6c3e597 100644 --- a/background.py +++ b/background.py @@ -1,4 +1,5 @@ import pygame +import colorsys class Background: def __init__(self): self.sprite = pygame.image.load('data/gfx/bg.png') @@ -8,4 +9,4 @@ def setSprite(self, tint): copy = self.uncoloredSprite.copy() color = colorsys.hsv_to_rgb(tint,1,1) copy.fill((color[0]*255, color[1]*255, color[2]*255), special_flags=pygame.BLEND_ADD) - self.sprite = copy \ No newline at end of file + self.sprite = copy