guzman
Member
Using the empty space of the 'for' we can gain one character more:
121 characters:
It is interesting that the code is not so involved, it is still quite readable and linear in its structure.
EDIT: 115 characters
(111 if we accept uneven spaces in the output).
121 characters:
Code:
r=Math.random;for(c=b=j=0;j<25;c+b==5&&c==m||b==m||(c=b,b=m,j++,document.write("URFBLD"[m]+" 2'"[0|r()*3]+" ")))m=0|r()*6
It is interesting that the code is not so involved, it is still quite readable and linear in its structure.
EDIT: 115 characters
Code:
r=Math.random;for(c=b=j=0;j<25;c+b==5&c==m|b==m||document.write("URFBLD"[j++,c=b,b=m]+" 2'"[0|r()*3]+" "))m=0|r()*6
(111 if we accept uneven spaces in the output).
Last edited: