Ask coding questions

← Back to all posts
Pixel Art
GabrielDixon (0)

Hello everyone, I am having trouble with my project and thought it would be a good idea to ask for some help. The code in this project works fine, however I cannot find a way to reliable way to fill the individual boxes other than typing over 1000 lines of code (Which is rather crazy). If anyone has any ideas, feel free to help out.

Thank You for your time

Answered by mwilki7 (410) [earned 5 cycles]
View Answer
Commentshotnewtop
mwilki7 (410)

You want to be able to fill the individual boxes?

GabrielDixon (0)

yes, feel free to modify the code if needed.

mwilki7 (410)

@GabrielDixon
You can stick the fill code right inside your line-drawing code.

for i in range(25):
    t.begin_fill()
    for i in range(4):
        t.forward(25)
        t.right(90)
    t.forward(25)
    t.end_fill()
GabrielDixon (0)

@mwilki7
ok thanks for your help, I will give you a shoutout for helping :)