scene.org File Archive

File download

<root>­/­parties­/­2025­/­vccc25­/­christmas_challenge/logiker_pc_python_148b_vc3-2025.zip

File size:
28 743 bytes (28.07K)
File date:
2025-12-30 23:34:07
Download count:
all-time: 2

Preview

  • file_id.diz 731B
  • screenshot.png 33.41K
  • snowflake.py 148B

file_id.diz

Christmas Snowflake Python

Author:   Logiker
Category: Christmas Challenge
System:   PC
Language: Python
Len source code: 148
Len exe file:    148
Len code only:   148
Instructions:
Run with Python interpreter.

Description:
This aproach is formular based and not data based. A database apraoch could be much smaller, 
as I have used it for my C64 release. 
The main work is done in the condition, that decides weather to draw a space or star:
a=abs(i);b=abs(j);s+=chr(32+10*(a*b<1 or(a==b or min(a,b)==5)and a|b<8 or(a%3-b)*(b%3-a)==0))
a*b<1 ... Horizontal and vertial line (one of both needs to be 0)
a==b or min(a,b)==5 ... Diagonal lines and orthogonal side lines
(a%3-b)*(b%3-a)==0 ... Diagonal side lines