Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

Thursday, February 12, 2009

random rules


Sorry, you have a Java-challenged browser!


Here's the other version of the tile game. It's actually the first one I wrote and a lot more difficult to achieve logically. This other one can be completely random because the tiles have ends on each side, but in this version, only two sides have arc ends which constrains the options for rotation significantly as to avoid "dead ends." Once I had written this code however, it was only a matter of about ten minutes to trim out the excess to arrive at the other version of this code which is conceptually simpler.

Wednesday, February 11, 2009

cul-de-sac


Sorry, you have a Java-challenged browser!


My critic showed us these children's toys using tiles arranged in patterns. arranged manually, it takes some time to simply copy/paste/rotate/move so I decided to script the process. This applet shows no bias towards the two tiles, but it is possible to adjust a bias and achieve more predictable results. Each time the script is run, the results are unique (in this version, I believe there are 2^(50^2) permutations) Maybe I'll build some sort of interface for this thing…or maybe I have better things to do.

tomorrow I'll post another version with different pieces.