-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
396 lines (381 loc) · 20.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd">
<HTML>
<HEAD> <LINK REL="stylesheet" TYPE="text/css" HREF="main.css"><META
NAME="KEYWORDS"
CONTENT="Crosswords , Friends ,infinite , instant , unlimited , crossword , cross, word, generator , puzzle , script , crosswords, printable">
<META NAME="DESCRIPTION"
CONTENT="Crosswords for Friends. Infinite Crossword Puzzle Generator Script to create Crosswords for prining or saving for use in your web browser">
<TITLE>Emogic's Crosswords Puzzle Generator</TITLE> <SCRIPT SRC="./js/jquery-1.11.3.min.js"></SCRIPT>
</HEAD>
<BODY BACKGROUND="crossword.gif" STYLE="main.css">
<CENTER>
<TABLE CELLPADDING="0" CELLSPACING="1" BGCOLOR="#000000">
<TR>
<TD>
<TABLE CELLPADDING="5" CELLSPACING="0" BGCOLOR="#FFFFFF">
<TR>
<TD COLSPAN="3">
<H6 ALIGN="CENTER">Back to <A HREF="/">Emogic</A></H6>
<H3 ALIGN="CENTER"><A HREF="/">Emogic's</A> Crossword
Generator </H3></TD>
</TR>
<TR>
<TD
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
VALIGN="TOP">
<CENTER>
<FORM ACTION="/cgi/crosswords/crossword.cgi" METHOD="POST"
NAME="StartForm" ID="StartForm">
<P></P> <HR>
<TABLE BORDER="0">
<TR>
<TD VALIGN="TOP">
<TABLE CELLPADDING="0" CELLSPACING="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD VALIGN="TOP" COLSPAN="2"
ALIGN="CENTER"><INPUT TYPE="radio" NAME="layouts" CHECKED="CHECKED"
VALUE="grids"><A HREF="#"
ONCLICK="alert(gridsvar);return false;">Grids</A></TD>
</TR>
<TR>
<TD VALIGN="TOP">
<SELECT NAME="grid" SIZE="6">
<OPTION VALUE="3x3"
CLASS="gridOption">Double Word Squares - no black squares</OPTION>
<OPTION VALUE="3x3">3x3</OPTION>
<OPTION VALUE="4x4">4x4</OPTION>
<OPTION VALUE="5x5">5x5</OPTION>
<OPTION VALUE="6x6">6x6</OPTION>
<OPTION VALUE="7x7">7x7</OPTION>
<OPTION VALUE="13x13_56_144"
CLASS="gridOption">Standard USA Grids</OPTION>
<OPTION VALUE="13x13_56_144"
SELECTED="SELECTED">13x13_56_144</OPTION>
<OPTION
VALUE="13x13_56_144b">13x13_56_144b</OPTION>
<OPTION
VALUE="13x13_60_146">13x13_60_146</OPTION>
<OPTION
VALUE="13x13_62_145">13x13_62_145</OPTION>
<OPTION VALUE="15x15">15x15</OPTION>
<OPTION
VALUE="16x16_80_42">16x16_80_42</OPTION>
<OPTION
VALUE="17x17_100_48">17x17_100_48</OPTION>
<OPTION
VALUE="19x19_116_58">19x19_116_58</OPTION>
<OPTION VALUE="21x21">21x21</OPTION>
<OPTION
VALUE="21x21_126_64">21x21_126_64</OPTION>
<OPTION VALUE="BigOne">BigOne</OPTION>
<OPTION
VALUE="21x27_178_92">21x27_178_92</OPTION>
<OPTION
VALUE="23x23_160_87">23x23_160_87</OPTION>
<OPTION VALUE="13x13_22_112"
CLASS="gridOption">British Style</OPTION>
<OPTION
VALUE="13x13_22_112">13x13_22_112</OPTION>
<OPTION
VALUE="15x15_26_138">15x15_26_138</OPTION>
<OPTION
VALUE="21x21_44_292">21x21_44_292</OPTION>
</SELECT><BR></TD>
<TD VALIGN="TOP"></TD>
</TR>
</TABLE><BR>
<TABLE BORDER="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><INPUT TYPE="radio"
NAME="layouts" VALUE="doublespaced">
<A HREF="#" ONCLICK="alert(britishgridsvar);return false;">British Grids
Random</A><BR><BR>Width/Height
<INPUT TYPE="TEXT" NAME="doublespacedwidth" SIZE="3" VALUE="7"><BR><INPUT
TYPE="CHECKBOX" NAME="evenodd" VALUE="1">Even/Odd<BR><INPUT TYPE="TEXT"
NAME="doublespacedpercentage" VALUE="65" SIZE="3">PercentageWhite<BR><BR><INPUT
TYPE="CHECKBOX" NAME="doublespacedfull" VALUE="1"> Full (100% white)</TD>
</TR>
</TABLE><BR>
<TABLE BORDER="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><A HREF="#"
ONCLICK="alert(slowdownvar);return false;">Slow Down</A><BR><INPUT TYPE="TEXT"
NAME="SlowDown" VALUE="0" SIZE="3"> 5 seconds max</TD>
</TR>
</TABLE>
<TABLE BORDER="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><INPUT TYPE="CHECKBOX"
NAME="shuffle" CHECKED="CHECKED">
<A HREF="#" ONCLICK="alert(shufflevar);return false;">Suffle
Words/Letters</A></TD>
</TR>
</TABLE></TD>
<TD>
<TABLE CELLPADDING="0" CELLSPACING="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD VALIGN="TOP" COLSPAN="2" ALIGN="CENTER"><A
HREF="#" ONCLICK="alert(worddatabasevar);return false;">Word Databases</A></TD>
</TR>
<TR>
<TD VALIGN="TOP">
<INPUT TYPE="radio" NAME="wordfile" CHECKED="CHECKED" VALUE="Clues_248505">
<A HREF="./wordlists/Clues_248505/stats.txt" TARGET="_blank">248,505 Words</A>
(recommended)<BR> <INPUT TYPE="radio" NAME="wordfile" VALUE="Sympathy_31121">
<A HREF="./wordlists/Sympathy_31121/stats.txt" TARGET="_blank">31,121
Words</A><BR>
<INPUT TYPE="radio" NAME="wordfile" VALUE="Magnum_Eng_Clues_30420">
<A HREF="./wordlists/Magnum_Eng_Clues_30420/stats.txt" TARGET="_blank">30,420
Words</A><BR> <INPUT TYPE="radio" NAME="wordfile"
VALUE="CrosswordSolver_18790">
<A HREF="./wordlists/CrosswordSolver_18790/stats.txt" TARGET="_blank">18,790
Words</A><BR> <INPUT TYPE="radio" NAME="wordfile" VALUE="CSolver_18675">
<A HREF="./wordlists/CSolver_18675/stats.txt" TARGET="_blank">18,675
Words</A><BR>
<INPUT TYPE="radio" NAME="wordfile" VALUE="CrosswordComiler_17763">
<A HREF="./wordlists/CrosswordComiler_17763/stats.txt" TARGET="_blank">17,763
Words</A><BR> </TD>
<TD VALIGN="TOP"></TD>
</TR>
</TABLE><BR>
<TABLE BORDER="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD ALIGN="CENTER"><A HREF="#"
ONCLICK="alert(walkpathvar);return false;">WalkPath</A></TD>
</TR>
<TR>
<TD ALIGN="CENTER">
<SELECT NAME="walkpath" SIZE="6"
ID="walkpath">
<OPTION VALUE="crossingwords"
CLASS="gridOption">Word Walks</OPTION>
<OPTION VALUE="crossingwords"
SELECTED="SELECTED">Crossing Words (best)</OPTION>
<OPTION VALUE="zigzag">Zig Zag
Words</OPTION>
<OPTION VALUE="diagonal">Diagonal
Words</OPTION>
<OPTION VALUE="numerical">Numerical
Words</OPTION>
<OPTION VALUE="acrossthendown">Across then
Down Words</OPTION>
<OPTION VALUE="random">Random Words
(worst)</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardFlat" CLASS="gridOption">Letter
Walks</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardZigZag">ZigZag Letters</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardDiag">Diag Letters</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardFlat">Flat Letters</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardSwitchWalk">Switch Letters</OPTION>
<OPTION
VALUE="GenerateNextLetterPositionsOnBoardSnakeWalk">Snake Letters</OPTION>
</SELECT><BR><INPUT TYPE="CHECKBOX"
NAME="simplewordmasksearch">
<A HREF="#" ONCLICK="alert(simplewordmaskvar);return false;">Simple Word Mask
Search</A><HR><INPUT TYPE="CHECKBOX" NAME="optimalbacktrack" VALUE="1"
CHECKED="CHECKED">
<A HREF="#" ONCLICK="alert(optimumbacktrackvar);return false;">Optimal
Backtrack</A> (Recommended)</TD>
</TR>
</TABLE><BR>
<TABLE BORDER="0"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
WIDTH="100%">
<TR>
<TD ALIGN="CENTER"> Calculate Time<BR><INPUT
TYPE="TEXT" NAME="TimeLimit" VALUE="5" SIZE="5"> 10 min max </TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
<P><INPUT TYPE="SUBMIT" NAME="Submit1"
VALUE="Generate Puzzle"></P>
<P><INPUT TYPE="RESET" NAME="Reset1"
VALUE="Reset Defaults"></P> </FORM> </CENTER>
<P ALIGN="CENTER"><A HREF="/crosswords/common/"><B>Crossword
Puzzle Archive</B></A></P></TD>
<TD
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid"
VALIGN="TOP" COLSPAN="2" ALIGN="CENTER">
<P>Behind the Curtain<BR>Updates every few seconds</P>
<FORM><TEXTAREA ROWS="25" COLS="60" ID="PrintProcessing" NAME="PrintProcessing"></TEXTAREA></FORM>
<DIV>Crossword Result:
<DIV ID="PrintResults"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid">YOUR
CROSSWORD LINK WILL SHOW HERE</DIV></DIV>
<FORM NAME="EraseForm" ID="EraseForm" ACTION="erase.cgi"
ONSUBMIT="return;" METHOD="POST">
<P><INPUT TYPE="SUBMIT" NAME="Submit2"
VALUE="Erase stalled crossword generation"><BR>(Use if display above does not
update)</P> </FORM> </TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="CENTER"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid">
<!--FB share below-->
<DIV ID="fb-root"></DIV> <SCRIPT>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=34818814539&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</SCRIPT>
<CENTER>
<div class="fb-like" data-href="https://apps.facebook.com/emogiccrossword/" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
</CENTER>
<!--FB share end-->
</TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="CENTER"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid">Notes
about the creation of this Crossword Generator Algorithm and Script:<BR><A HREF="https://www.emogic.com/notes/notes"
TARGET="_blank">https://www.emogic.com/notes/notes</A></TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="CENTER"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid">
<P ALIGN="CENTER"><B><FONT COLOR="#CC0000">If you have a
crossword grid you would like to see, send it to:
<A HREF="http://www.emogic.com/contact" TARGET="_blank">us</A></FONT></B>. </P>
<P ALIGN="CENTER">The format must bei n the format below. The
white are lowwer case 'o' and the black are lower case 'x'.</P>
<PRE>oxxo
oooo
oooo
oxxo</PRE></TD>
</TR>
<TR>
<TD COLSPAN="3" ALIGN="CENTER"
STYLE="border-top: 1pt solid; border-right: 1pt solid; border-bottom: 1pt solid; border-left: 1pt solid">
<P>Thanks to:</P>
<P> <A HREF="http://www.cruciverb.com"
TARGET="_blank">cruciverb.com</A></P>
<P><A HREF="http://thesis.cambon.dk/"
TARGET="_blank">thesis.cambon.dk/</A></P>
<P>and <A HREF="http://www.otsys.com/clue" TARGET="_blank">
www.otsys.com/clue</A></P></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE></CENTER> <SCRIPT>
var gridsvar = 'These are some standard pre-generated grids. See below if you want to contribute other grids.';
var britishgridsvar = 'This will generate a random British style grid (double spaced). Nothe that it is not symetrical.';
var worddatabasevar = 'The more words we have in our database the easier it is to generate a crossword.';
var walkpathvar = 'The walk path is the order we try to lay down words. The path chosen can vastly improve the generation time. Different paths work better for different grids but Crossing Words is the best for most situations. Letter walks are the slowest and are provided only to test and prove this fact.';
var optimumbacktrackvar = 'Optimal Backtrack vastly speeds up the search by removing more than one word when we can no longer lay down another word. It will continue to remove words until it reaches a word that potentially caused the failure.';
var slowdownvar = 'Only use this if you want to see the walk in slow time. It is not useful in generating crosswords.';
var shufflevar = 'If unchecked, it will try to lay words down in alphabetic order. So it will generate the same puzzle each time. It is not useful in generating crosswords. It is only usefull if you want to replicate a crossword generation scenario.';
var simplewordmaskvar = 'This lets the recursion figure out if the crossing words will play nice. Although is speeds up the words layed per second, it is slower overall.';
//get processing.txt often
function Get_Processing()
{
// Assign handlers immediately after making the request,
//and remember the jqxhr object for this request
var d = new Date();
var tm = d.getTime();
var jqxhr = $.get( "./processing.txt?" + tm
, function(){ $("#PrintProcessing").html( jqxhr.responseText ); }
, "html"
)
//.done(function() {} )
//.always(function() { //alert( "finished"); })
.fail(function() { $("#PrintProcessing").html( '...no other crosswords running...' ) } );
//setTimeout( "Get_Processing();" , 1000 ); //keep the ball rolling
};
//get results.txt often
function Get_Results()
{
// Assign handlers immediately after making the request,
//and remember the jqxhr object for this request
var d = new Date();
var tm = d.getTime();
var jqxhr = $.get( "./results.txt?" + tm
, function(){ $("#PrintResults").html( jqxhr.responseText ); }
, "html"
)
//.done(function() {} )
//.always(function() { //alert( "finished"); })
.fail(function() { $("#PrintResults").html( 'no results file' ) } );
//setTimeout( "Get_Results();" , 1000 ); //keep the ball rolling
};
// Attach a submit handler to the MyForm
$( "#StartForm" ).submit(
function(event)
{
// Stop form from submitting normally
event.preventDefault();
// Get some values from elements on the page:
var $form = $( this ) , term = $form.serialize(), url = $form.attr( "action" );
// Send the data using post
var posting = $.post( url, term );
posting.done(
function( data )
{
//$("#PrintResult").html( data );
alert(data);
}
);
posting.fail(
function( data )
{
//$("#PrintResult").html( data );
alert(data);
}
);
//$("#PrintResult").html( 'Wait for it.....' ); #starts output directed to #PrintResult
}
);
function pause(milliseconds) {
var dt = new Date();
while ((new Date()) - dt <= milliseconds) { /* Do nothing */ }
}
// Attach a submit handler to the EraseForm
$( "#EraseForm" ).submit(
function( event )
{
// Stop form from submitting normally
event.preventDefault();
// Get some values from elements on the page:
var $form = $( this ), term = $form.serialize(), url = $form.attr( "action" );
// Send the data using post
var posting = $.post( url, term );
posting.success(
function(data)
{
alert(data);
}
);
posting.fail(
function( data )
{ alert(data); }
);
posting.done(
function( data )
{
//alert('Stalled crossword erased');
}
);
}
);
var timer1 = setInterval("Get_Processing();",1000); //start ball rolling
var timer2 = setInterval( "Get_Results();" , 1000 ); //start the ball rolling
</SCRIPT> </BODY>
</HTML>