|
MoSudoku comes with a database of a few hundred puzzles of varying difficulty. To load a random puzzle from the database, simply click "Import Puzzle" on the sidebar.
In addition to the puzzles that exist in the MoSudoku database, it is possible to import puzzles from external websites providing Sudoku feeds. To do so, select the Feeds & Settings tab and click on one of the feeds under the Puzzle Feeds heading.
When you move the mouse over a square, the values that may be placed in that square (the "candidates") are displayed on the bottom left of the puzzle grid, and its current value is highlighted. Clicking on the square changes its value to the next one in the list. The square can be reset to blank by clicking through to the end of the list.
With the mouse pointer over a square, you can also type in the value you wish to assign to the square with the keyboard. If the square already has that value, it returns to being a blank square.
The puzzle givens can't be changed in these ways.
If you slow-click a square (click and hold the left-mouse button for about half a second, then release) it will enter "Pencil Mode", which helps you keep track of the values that can be eliminated as candidates for that square. The current candidate values for the square will be displayed in an invisible grid within the square. Clicking on the values will remove them, and clicking again will make them reappear.
You may also use the keyboard to write or erase pencil marks when the mouse is over a square.
When you ask MoSudoku to find hints for you, it considers the pencil markings you've made as authoritative, and will base its analysis on them.
As you make moves on the puzzle grid, they are listed in order on the left of the puzzle. They are displayed in the form:
(row,column):value
The "Undo" command undoes the last move in the list, while "Start Over" clears all moves on the puzzle grid, leaving only the givens.
MoSudoku may be able to help you when you get stuck. When you click "Get Hint", it applies a series of increasingly complex strategies to the puzzle grid in an attempt to deduce the next move, or failing that to eliminate candidate values from squares. If hints are found, they are displayed at the top of the Help tab (this one).
Depending on the settings, MoSudoku may solve the puzzle the first time you request a hint. Thereafter it will inform you if you have made a wrong move. However, due to practical constraints, MoSudoku will not try to solve puzzles with dimensions larger than 9x9.
There are two ways to save the current state of a puzzle.
The first way is simply to click "Save". The puzzle and related settings will be saved on your computer as a cookie. To load this puzzle the next time you access MoSudoku, click "Load". Currently you can only save one puzzle this way at a time.
The second way is to click "Export Puzzle". A text string representing the puzzle configuration will appear in the import/export text field on the sidebar. Copy the entire text string and paste it into a text editor, such as Wordpad or GEdit, then save the file as "MySavedSudoku.txt". To load the puzzle later, open "MySavedSudoku.txt" with a text editor, copy the text string, and paste it into the import/export field on the MoSudoku sidebar. Then click "Import Puzzle".
You can save a copy of MoSudoku on your computer to play when not connected to the internet. In both IE and Firefox, make sure to select "Web Page, HTML only" for the "Save as type" option in the save dialog.
| m | o | 数 |
| 密 | k | 独 |
| s | u | d |
MoSudoku is a single page implementation of the popular Sudoku puzzle written using javascript, xhtml, and css. It tries to provide the best user experience through simplicity and good design. MoSudoku was conceived during a trip I took to visit friends in Missouri, when I first tried playing Sudoku. MoSudoku is dedicated to Lesley, David, Jo, and Michael Sapp.
The current version is 0.1.3 . Comments and feedback are greatly appreciated.
Haw-Bin Chai, hbchai@gmail.com
I outline some of the guiding principles behind MoSudoku below:
Everything required to use MoSudoku, including documentation, should be available as a single webpage, with no externally linked resources such as flash, images, javascript, or even stylesheets. This makes sharing the program, downloading a copy for local use, and (for me) publishing new versions as simple as transferring a single file.
MoSudoku comes with a puzzle database with hundreds of puzzles of varying difficulty. These may be played without access to the internet. Puzzles not available in the database may be imported using a standard puzzle format.
There are plenty of Sudoku incarnations out there that require you to click the puzzle square you want to manipulate, then type in the value you want to give it. This is cumbersome and may cause the user's hands to jump from the mouse to the keyboard to perform what should be a simple action. Moreover, text boxes are ugly and the blinking cursor is just plain distracting. I conceive of the mouse as a pencil equivalent. Everything that can be done using a pencil in a paper-and-pencil version of Sudoku should be possible using only the mouse in a software version. Keyboard use is welcome but not required.
The number of mouse clicks should be minimized. In many ways it is easier for me to print out a hard copy of a Sudoku puzzle for play. Why should I play it on the computer? One sure way to convince me I shouldn't is to make it seem more difficult to fill in values on the puzzle using the mouse than to write in the values by pencil. Ideally, using the mouse should seem as natural as using a pencil.
The default style settings for MoSudoku aim to make all puzzle elements comfortably visible at a screen resolution of 800x600, for all the major modern browsers I have access to (Firefox, IE6, and Opera). Increasing or decreasing the display size should make the visual elements scale gracefully. MoSudoku should be "bulletproof" insofar that resizing should not cause any elements to become unaccessible. Furthermore, interacting with the puzzle should not produce jarring visual events, such as elements resizing unexpectedly. MoSudoku should be easy on and pleasing to the eyes!
One aspect of being visible is availability for browsers that don't have flash installed. There are some excellent versions of Sudoku out there that require flash; however as I personally often choose not to install flash in order to circumvent all the annoyances that come with the package, I would be hypocritical to make flash a requirement for MoSudoku. Not to mention that I often will not visit sites that tie central functionality to flash.
Part of being beautiful is remaining true to one's purpose. While I love and want to work for Google, MoSudoku does not follow the AdSense path.
To return to the question of why I should bother playing Sudoku on the computer.
Making illegal moves can be a big waste of time, especially when such mistakes are not discovered immediately. Not only does MoSudoku disallow illegal moves, it also displays all legal moves.
Computers are really good at keeping track of what's been done and what's left to do. MoSudoku provides a move history list so the most recent moves can be recalled and undone. This is especially useful when applying last-resort solving strategies that require guessing and backtracking.
MoSudoku can give hints when you are stuck, but it does not provide you with the next piece of the puzzle without some context. It will never simply hand the completed puzzle to you on a platter, because doing so is pointless. It tries to solve the puzzle the way a person would, not the way a computer with its massive computational horsepower would. When MoSudoku finds a hint, it tells you what strategies it used to do so and the relevant puzzle squares it looked at. MoSudoku can actually improve your Sudoku game by showing you how various solving strategies work. MoSudoku teaches you how to fish.
It may not give you hints with lightning speed like some other Sudoku implementations (some platform specific), but that was never its design objective. The goal of MoSudoku is to give you a great overall Sudoku experience.
The dimensions of the puzzle grid are not hard-coded into MoSudoku. This means that if you wanted to create or play puzzles with 4x4 regions, you could do so easily.
MoSudoku is licensed under the GPL.
I would love to see MoSudoku run on the Sony PSP. Unfortunately the current state of javascript DOM support on the PSP is very limited. Most notably, the createElement() and appendChild() methods do not have complete implementations. Hopefully this will change with future firmware releases.
CRLF.href="javascript:fn" pseudo protocol which interrupted feed loading in IE.Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
appendDebug() and clearDebug() functions to add and remove output, and objectDump() to stringify objects to a format akin to php's print_r() output. document.cookie, document.settings, document.sudoku(depth=2)