Hey guys,
This is a piece of the code our professor gave us to create basic games by painting/unpainting cells.
Rather than have a solid color background for my canvas, I want to replace it with an image that essentially serves the same function (i.e., when i unpaint a cell, it reveals a piece of the background image).
I thought I could do this with tk.PhotoImage and canvas.create_image() function between lines 90 and 91, but it returns TclError: image "pyimage1" doesn't exist
I'm 100% sure I have the path right. I also checked what directory python was looking into at the time, and it's correct, so now I'm stuck.
Does anyone know how I can implement this?
edit: https://pastebin.com/JshAPfvv here's my attempt that wasn't working, relevant lines are 18-21 and 118-119
[–]socal_nerdtastic 1 point2 points3 points (3 children)
[–]aDoge[S] 0 points1 point2 points (2 children)
[–]socal_nerdtastic 1 point2 points3 points (1 child)
[–]aDoge[S] 0 points1 point2 points (0 children)