Skip to main content
Bounty Ended with 50 reputation awarded by Joe85AC
added 12 characters in body
Source Link
gastropner
  • 4.4k
  • 1
  • 15
  • 20

C (gcc), 959 947 947 937 bytes

-12 -10 bytes thanks to ceilingcat!

#define Z g&&S(r,c+40,20,q,1)
#define W write(o
H=1402;y=4206;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*y+C--*3,3);}main(g){I=memset(malloc(y*H),~0,y*H);for(write(o=openW=open("a.png",33537),"\x89PNG\r\n\32\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\eNIDAT\b\35",43);++i<13;)for(j=0;j<12;8&Z)g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),1&Z,r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r-~r]-q,0,2);for(r=H;r--;I+=write(o;I+=W,I,y))*d=!r,write(oW,d,6);write(o;W,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82""\xfc\xa3\xea\xe1\xe8\x93\274a\0\0\0\0IEND\256B`\x82",20);}

Try it online!Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

C (gcc), 959 947 bytes

-12 bytes thanks to ceilingcat!

#define Z g&&S(r,c+40,20,q,1)
H=1402;y=4206;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*y+C--*3,3);}main(g){I=memset(malloc(y*H),~0,y*H);for(write(o=open("a.png",33537),"\x89PNG\r\n\32\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\eNIDAT\b\35",43);++i<13;)for(j=0;j<12;8&Z)g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),1&Z,r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r-~r]-q,0,2);for(r=H;r--;I+=write(o,I,y))*d=!r,write(o,d,6);write(o,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82",20);}

Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

C (gcc), 959 947 937 bytes

-12 -10 bytes thanks to ceilingcat!

#define Z g&&S(r,c+40,20,q,1)
#define W write(o
H=1402;y=4206;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*y+C--*3,3);}main(g){I=memset(malloc(y*H),~0,y*H);for(W=open("a.png",33537),"\x89PNG\r\n\32\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\eNIDAT\b\35",43);++i<13;)for(j=0;j<12;8&Z)g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),1&Z,r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r-~r]-q,0,2);for(r=H;r--;I+=W,I,y))*d=!r,W,d,6);W,"\xfc\xa3\xea\xe1\xe8\x93\274a\0\0\0\0IEND\256B`\x82",20);}

Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

added 120 characters in body
Source Link
gastropner
  • 4.4k
  • 1
  • 15
  • 20

C (gcc), 959959 947 bytes

-12 bytes thanks to ceilingcat!

H=1402;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q#define Z g&&S(r,c+40,20,q,1)
H=1402;y=4206;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*H*3+CI+h*y+C--*3,3);}main(g){I=memset(malloc(H*3*Hy*H),~0,H*3*Hy*H);for(write(o=open("a.png",33537),"\x89PNG\r\n\x1A\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\x1bNIDAT\b\x1D""\x89PNG\r\n\32\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\eNIDAT\b\35",43);++i<13;)for(j=0;j<12;g&8&&S(r,c+40,20,q,1)j=0;j<12;8&Z)g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),g&1&&S(r,c+40,20,q,1)1&Z,r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r*2+1]s[r-~r]-q,0,2);for(r=H;r--;I+=write(o,I,H*3y))*d=!r,write(o,d,6);write(o,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82",20);}

Try it online!Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

C (gcc), 959 bytes

H=1402;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*H*3+C--*3,3);}main(g){I=memset(malloc(H*3*H),~0,H*3*H);for(write(o=open("a.png",33537),"\x89PNG\r\n\x1A\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\x1bNIDAT\b\x1D",43);++i<13;)for(j=0;j<12;g&8&&S(r,c+40,20,q,1))g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),g&1&&S(r,c+40,20,q,1),r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r*2+1]-q,0,2);for(r=H;r--;I+=write(o,I,H*3))*d=!r,write(o,d,6);write(o,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82",20);}

Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

C (gcc), 959 947 bytes

-12 bytes thanks to ceilingcat!

#define Z g&&S(r,c+40,20,q,1)
H=1402;y=4206;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*y+C--*3,3);}main(g){I=memset(malloc(y*H),~0,y*H);for(write(o=open("a.png",33537),"\x89PNG\r\n\32\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\eNIDAT\b\35",43);++i<13;)for(j=0;j<12;8&Z)g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),1&Z,r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r-~r]-q,0,2);for(r=H;r--;I+=write(o,I,y))*d=!r,write(o,d,6);write(o,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82",20);}

Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".

Source Link
gastropner
  • 4.4k
  • 1
  • 15
  • 20

C (gcc), 959 bytes

H=1402;char*s="VDRMOSMWK[I^HaGcFeEgDiCkBlAnAo@p@q?r?s>t>u>u=v=w=w=w<x<x<x<x<x<x<x<x<x=w=w=w=v=v>u>t>t?s?r@q@pAoBmBlCjDhEfFdGbI_J]LYNUPPSJ",*I,d[]="\0o\20\x90\xef",*G=",&&* ,* ,&&*%* %&#%*%*,#,#,&*,*%*)) ) %*%#%*%#%*),*%*,*%*,*)))%*%#%*%#%#)%*%*,*) ,* %*%*%#%#,#%* %*%*,*,#,*),*%*%#%#,#)))%&# ,*,#,#)%&&&&#%# %&#";P[]={0,255,~0<<16,~0},o,C,u,v,i,j,r,c,q=60,z=100;S(a,b,w,h,X){for(h+=a;h/a;h--)for(C=b+w;C/b;)bcopy(P+X,I+h*H*3+C--*3,3);}main(g){I=memset(malloc(H*3*H),~0,H*3*H);for(write(o=open("a.png",33537),"\x89PNG\r\n\x1A\n\0\0\0\rIHDR\0\0\5z\0\0\5z\b\2\0\0\0\xDCTSV\0Z\x1bNIDAT\b\x1D",43);++i<13;)for(j=0;j<12;g&8&&S(r,c+40,20,q,1))g=*G++%32,u=j++==5,v=i==7,S(r=i*z+i/7,c=j*z|j>6,z+u,z+v,0),g&&S(r+!v,c+1,98+u,98+v,3),g&1&&S(r,c+40,20,q,1),r+=40,g&2&&S(r,c,q,20,1),g&4&&S(r,c+40,q,20,1);for(r=61;r--;)S(1281-r,s[r*2]+q,s[r*2+1]-q,0,2);for(r=H;r--;I+=write(o,I,H*3))*d=!r,write(o,d,6);write(o,"\xfc\xa3\xea\xe1\xe8\x93\xbc""a\0\0\0\0IEND\xAE""B`\x82",20);}

Try it online!

Each position on the board is stored in the lower four nibbles of the characters of the string G. A zero means a black tile, otherwise each bit corresponds to one "arm" of a junction:

 0
1 2
 3

So a ┌ junction would be stored as the bits 1100, for example.

We simply loop through the string and draw tiles accordingly. Care is taken to match the jankiness that occurs in the middle of the board (slightly wider tiles and therefore everything shifted down/right thenceforth).

Everything is drawn as filled rectangles. An empty tile is just a black rectangle with slightly smaller white rectangle painted over it.

The circle caused some headache; just the data for it takes almost as much as the data for the rest of the board. I tried some circle-drawing methods, but the circle is not symmetrical, so no luck.

Various CRCs and similar are hardcoded, since we will always output the same image.

Stores output to "a.png".