7

[Small talk] I drew a diamond sword

FlashDragon's Avatar FlashDragon10/21/23 7:16 am
7 emeralds 235 5
10/27/2023 6:11 am
ammrweoi's Avatar ammrweoi
I drew a diamond sword in python.
I have to admit that my code level is terrible, after all, it took me over 600 lines of code to complete it.😥

Here is the code link: https://github.com/FlashDragons/Python/blob/main/turtle_painting/Minecraft/diamond_sword1.py Will you not laugh at me?🥲
Posted by FlashDragon's Avatar
FlashDragon
Level 6 : Apprentice Crafter
51

Create an account or sign in to comment.

5

Sun9ty
10/21/2023 9:42 pm
Level 40 : Master Wolf
Sun9ty's Avatar
Awesome! 😎🤗
3
ItzOrangey
10/21/2023 9:38 pm
Level 41 : Master Wolf
ItzOrangey's Avatar
Ooh cool!
2
ScotsMiser
10/21/2023 9:37 pm
Level 38 : Artisan Miner
ScotsMiser's Avatar
Insufficiently knowledge of python (waht little I can see of the code puts me in mind of Logo's turtle graphics), but 600 lines seems high even if (as in the visible fragment) it takes 8 or 9 lines of code per connected color group…

Then again, it works… which is a strong point in favor of any program….
2
OrderWithoutBorders
10/21/2023 9:10 am
Level 10 : Journeyman Network
OrderWithoutBorders's Avatar
The most efficient code for this is a matrix reader and a predefined dictionary or hashtable of the pixels, I think. But since the sword is consistently diagonal, maybe only read numbers that are past the hilt mid points.
5
Juillyoom
10/21/2023 7:44 am
Level 42 : Master Skinner
Juillyoom's Avatar
me, who can't even do "hello world"
6
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome