• DeathByDenim@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    23 hours ago

    Cute! 😀

    It mostly works. I think line 103 should maybe be:

    os.remove(os.path.join(cdata, "teat.txt"))
    

    So, “teat.txt” instead of “eat.txt”. I think this prevents the cat from ever getting happy since that line causes an error and it never reaches image.set_from_file(os.path.join(current_dir, "data/happy.png")) which is very sad!

    Actually, you may just want to catch the error if the file happens to not exist. Like this:

        try:
            os.remove(os.path.join(cdata, "teat.txt"))
        except FileNotFoundError:
            pass
    
    • Igor360@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      20 hours ago

      nope. its work normal but thanks! also can you upgrade my game? i do some big upgrade!

      • DeathByDenim@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 hours ago

        Oh, I see. You fixed that one in 1.2. That wasn’t there yet when I commented. :)

        Yeah, works great now!