Online Official-Style Square-1 Scrambler with Images

Lucas Garron

Premium Member
Joined
Jul 6, 2007
Messages
3,757
Location
California
WCA ID
2006GARR01
YouTube
Visit Channel
But Ron always tells us: ") means )/". So slice after each (x,x).
Then apparently the scrambler is wrong, highlighting yet another issue.
I think it does 40 random actions (AUF, ADF, or /), and it's impossible to tell (easily) from the notation if there was a last twist or not.
Rather, the official notation requires a last twist, and the scrambler internally might not.

(I take each final Square-1 state straight out of Jaap's code.)
 
Excellent job Lucas! There's no reason this shouldn't be the new wca scrambler.

And yes, the ambiguities added with removing the "/" from the notation are very annoying. Although I remember porting Jaap's code to java for cct, and I don't recall any such problem with missing trailing slashes. I trust you to be making correct use of Jaap's code, however.
 
Excellent job Lucas! There's no reason this shouldn't be the new wca scrambler.

And yes, the ambiguities added with removing the "/" from the notation are very annoying. Although I remember porting Jaap's code to java for cct, and I don't recall any such problem with missing trailing slashes. I trust you to be making correct use of Jaap's code, however.
There's one reason: All WCA scramblers should run offline, preferably with no big requirements (e.g. a PHP installation is probably too much).
This is an unofficial restriction by Ron himself.

Also, don't trust me. I totally just took the end of the first appropriate loop I saw. :p

Can you use the CCT code to (easily) generate Square-1 images from a slimmer jar?
 
Alright, thanks to some more work by Eido to make port the PHP script to a JS library by a Walter Zorn:

And thanks to qq for cleaning up my code and fixing a few things (including adding back the final (0,0) indicating another / at the end). Teamwork ftw

http://mzrg.com/miniSites/scramblers/sq1_wca.html

Problem is, it doesn't seem to work in IE, and I don't know a simple way to fix that
Deleting IE would be a start.

Edit:
The library I used says it works on IE 4, 5, and 6, Firefox, Chrome, Opera, and Safari (among others)
 
Alright, thanks to some more work by Eido to make port the PHP script to a JS library by a Walter Zorn:

And thanks to qq for cleaning up my code and fixing a few things (including adding back the final (0,0) indicating another / at the end). Teamwork ftw

http://mzrg.com/miniSites/scramblers/sq1_wca.html
Quite nice, qq.

I think
Code:
		var stickers = (b.concat(c)).replace(/0/g,colorString[0]).replace(/1/g,colorString[1]).replace(/2/g,colorString[2]).replace(/3/g,colorString[3]).replace(/4/g,colorString[4]).replace(/5/g,colorString[5]);
		document.writeln("<tr><td><font face='Arial' size=3><b>&nbsp;&nbsp;"+scramblestring(i)+"<\/b><\/font><\/td><td>"+"<div style=\"position:relative;height:100px;width:200px;\" id=\"scramble"+i+"\">");
		drawSq(stickers,a,"scramble"+i);
		document.writeln("<\/div><\/td><\/tr>");
is a cleaner way to do the drawing, though.

Also, I probably should have used more descriptive variable names. :rolleyes:

Eido: IE in VirtualBox draws all the pieces red for me. It's not like I care, but Ron might.
 
Last edited:
Red is a color I was using to debug (it's the color set in the beginning, I forgot to take out that line) I'll try to see what's going on there tomorrow.
 
Back
Top