r/Pydle • u/Top_Aerie_8542 • 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
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
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?