Source

fc-solve / fc-solve / site / wml / src / js-fc-solve / text / index.html.wml

#include '../template.wml'

<latemp_subject "Web-Interface to Freecell Solver (text based)" />

<page_extra_head_elements>
<link rel="stylesheet" href="web-fc-solve.css" />
<script type="text/javascript" src="$(ROOT)/js/libfreecell-solver.min.js"></script>
<script type="text/javascript" src="$(ROOT)/js/web-fc-solve.js"></script>
<script type="text/javascript" src="$(ROOT)/js/joose.mini.js"></script>
<script type="text/javascript" src="$(ROOT)/js/ms-rand.js"></script>
<script type="text/javascript" src="$(ROOT)/js/gen-ms-fc-board.js"></script>
</page_extra_head_elements>

<h2 id="about">About</h2>

<p>
This is a web-based interface to
<a href="http://fc-solve.shlomifish.org/">Freecell Solver</a>, that was
translated from the C source code to JavaScript, by using
<a href="https://github.com/kripken/emscripten">emscripten</a>. It requires
<strong>JavaScript</strong> to be <strong>enabled</strong> for this domain,
and like Freecell Solver, is open-source software under the permissive
MIT/X11 licence. <a href="#how_to_use"><strong>How to use</strong></a>.
</p>

<hr/>
<div class="disabled">
<div class="emscripten" id="status">Downloading...</div>
<div class="emscripten">
<!--
  <progress value="0" max="100" id="progress"></progress>
-->
</div>
<!--
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
-->
</div>
<strong>Input:</strong>
<textarea class="emscripten" id="stdin" cols="50" rows="10"></textarea>
<hr />
<strong>Solving method:</strong>
<select id="preset">
<option value="as" selected="selected">Amateur Star (fast on average)</option>
<option value="qs">Qualified Seed (short solutions)</option>
<option value="default">Default</option>
</select>
<button id="run_do_solve" onclick="javascript:do_solve()">Solve!</button>
<button id="populate_input" onclick="javascript:populate_input_with_numbered_deal()" title="Populate Input with the layout of the Microsoft Windows Freecell #1941 board">Populate with a Windows Freecell Numbered Deal</button>

<hr/>
<div class="disabled">
<div class="emscripten"><input type="button" value="fullscreen" onclick="Module.requestFullScreen()" /></div>
<hr/>
</div>
<p id="status_wrap">
<strong>Status:</strong> <span id="fc_solve_status" class="not_started">Not started</span> <br />
</p>
<strong>Output:</strong>
<textarea class="emscripten" id="output" cols="50" rows="8" readonly="readonly"></textarea> <br />
<button id="clear_output" onclick="javascript:clear_output()" title="Clear the Output Box">Clear Output</button>
<div class="disabled">
<pre class="output" id="fc_solve_output">
</pre>
</div>

<h2 id="how_to_use">How to Use</h2>

<p>
Enter a board in <a href="#stdin">input</a> in
<a href="http://fc-solve.shlomifish.org/docs/distro/README.html">Freecell
Solver’s input format</a> with each line of input representing a column (or
    stack) of cards. Freecells and foundations can also be specified. A sample
layout can be input using the <a href="#populate_input">populate with sample
board button</a>. Press the <a href="#run_do_solve">“Solve” button</a> to
run the solver, and assuming it was successful, you will be able to read
or copy the output from <a href="#output">the output box</a>.
</p>

<p>
Enjoy!
</p>

<h2 id="credits">Credits</h2>
<ul>
<li>
<p>
<a href="https://github.com/kripken">Alon Zakai</a> - writing
<a href="https://github.com/kripken/emscripten">emscripten</a>, the
LLVM-to-JavaScript compiler that was used to prepare this page, based
on the original C (gnu99) source, and answering some bug reports and questions
I filed about it.
</p>
</li>
<li>
<p>
<a href="http://garage-coding.com/">Stefan Petrea</a> - inspired the
implementation of the populate-with-sample-board button.
</p>
</li>
</ul>