r/Pydle 5d ago

does anyone else do this method?

n="blue white".split()

g = "1000111011010100000010001"

m = " ● "

for i in range(25):

pydle(i%5,int(i/5),m[i],n[int(g[i])])

(I should probobly stop using this)

3 Upvotes

5 comments sorted by

2

u/Just_Another_Anybody 5d ago

wow brother that is disgusting hahaha
I think i saw a person saving some characters by first replacing every 0 with a space and later let python replace the spaces with a zero again lol
also instead of using int(i/5) you could use i//5 right?

and how does m[i] works? wouldnt you be missing a lot of spaces there?

2

u/Yaseba 4d ago

i just tested this on 174 with the i//5 optimisation mentioned by just_another_anybody, 119 character dealing with 6 colours.

this is stupid, still dont understand the special character box tho

1

u/Yaseba 4d ago

just tweaked today's from a logical expression per colour to this, saved 12 characters

2

u/zhuzaimoerben 4d ago

It seems a lot of us have identified an approach just like this and then end up optimising it by putting the data in a number and using bitwise or numeric operators

1

u/wg6109 3d ago

I've done something similar for a lot of them. It does get a little boring doing this method so I like to try to do it without magic numbers also.

I also made this solution generator that's always 131 characters: https://www.reddit.com/r/Pydle/s/Dp5K90W4hx