Contributed Program : Takeshita's Number Place
Instruction
This program uses puzzle generating engine provided by Time Intermedia Corporation.
http://puzzle.gr.jp/
This program has two functions, new puzzle creation, and play. In addition, there is demonstration mode to display puzzle and answer periodically.
Start button creates new puzzle and go into play mode. In play mode, you can enter answer digits. Single click on puzzle cell moves cursor and numeric buttons fills number at the cursor. Also, you can use pencil mark function by using a button with 3x3 dot mark. This button is toggling type and you can enter numbers as pencil mark to the blank cells while the button is in pushed position. The button returns to normal position by clicking again.
Upon all cells are filled by right answer, overall score is displayed. The score is calculated using difficulty and time spent.
If you need help, try Check button. It checks your answer and enables helper function. Color for first wrong answer is changed to red and numbers entered after the wrong number are changed to gray. Techniques are shown in popup if some techniques are required to solve the present pazzle. Recommendation is use of Undo to go back to the point before entering wrong answer.
The helper function is composed of 3 functions. When cursor is on blank or pencil mark cell, helper suggests answer if there are already other 8 numbers in column, line, and/or block. When cursor in on some number, helper indicate blocked cells by the number with a little dark background color.
Double click blank cell creates pencil mark by referring to column, line, and block. Double click pencil mark cell updates it (helper only removes mark for found number to prevent disturbing your manual removal by some technique). Use of Check button reducing your score.
In playing, small transparent numeric pad appears for puzzle panel as context menu popup and it functions as same as main numeric buttons. You can adjust transparency by clicking the popup number by right mouse button.
In context menu popup for other area (around buttons, labels), there are following functions.
Color: You can select preferable color.
Pencil Mark: You can change mark style.
Number style: You can select Chinese (一二三四五六七八九) or
Roman (Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ).
Action on close: You can select save play or not.
Before clicking Start button, after puzzle completion, or after you gave up puzzle,
there are following limited functions in context menu popup.
Paste (or CTRL-V) to paste puzzle from clipboard. The puzzle should be resolvable for the puzzle engine. It starts Play mode.
Color: same as play mode.
Pencil Mark: same as play mode.
Demo: Starts demonstration.
File > Open Viewer: opens file viewer to brows NumPlPuzzle file.
Options: Several special settings as follows:
Number of givens: used at auto pattern generation.
Auto pattern symmetry: You can select type.
Auto pattern timeout: Specify how long one pattern is tried.
Difficulty range: You can limit in the range.
Font: You can select font.
Use advanced setup mode: Enables use of advanced setup mode.
Suppress confirmation popup in setup mode: Suppresses popup.
Use popup numeric pad in setup mode: Enables use of transparent numeric pad in the advanced setup mode.
Save all auto created puzzles: You can use created puzzle later.
Save setting on close: Saves setting automatically.
Action on close in play: You can select save play or not.
Techniques: enables use of techniques.
Program assumes a puzzle has no answer if it requires Disallow techniques.
Program assumes a puzzle has no answer
if program was able to resolve it without using Require techniques.
Since program is applying techniques from top to bottom,
setting Require to the last technique to get the puzzle which cannot be resolved without the technique.
You can change the order by Up/Down buttons with selecting technique name.
If Require is selected, automatic puzzle creation will take long time.
Techniques is new function only in Number Place Generator Version 2.0.
In the advanced setup mode, you can create new puzzle manually or automatically. Please try Create button to create new puzzle automatically. If there is no given cell selection, several cells are chosen at random. You can specify given selection to obtain puzzle in preferable given pattern. Depending on given cell pattern you specified, program will be testing for a lot of combinations and may not stop timely. Some pattern cannot be resolved and program will never stop. Some may take long time to resolve. You can use Stop button to stop (and try different pattern). During creation, number of tried, time spent and difficulty are shown as progress message. The difficulty is not shown for insoluble puzzles. Only with Number Place Generator Version 2.0, if there are mumbers in some cells at puzzle creation, they will be fixed numbers (but numbers will be cleared and will not be fixed if there is no blank given cell).
To create puzzle manually, you can select several given cells and fill number in them. For how to choose pattern and number, please search in Internet or refer to appropriate books.
Given cells are shown in dark background color and other cells are for answers. You can toggle given cell selection by double click or right click. Single click moves cursor and numeric buttons fills number at the cursor. Check button checks whether the puzzle you created has proper answer. If there is an answer, difficulty is shown. Larger is more difficult. Techniques are shown in popup if some techniques are required to solve the present pazzle. Solve button shows the answer. Clear button clears answer numbers and pencil marks. If there is no number in answer cells and no pencil mark, it clears given numbers. Otherwise it clears given selection. You can start playing the puzzle by clicking Play button.
In the advanced setup mode,
following functions are enabled in context menu popup.
Copy (or Ctrl-C) to copy the puzzle to clipboard. You can paste it to Excel, for example, to decorate and print, or paste to text editor and save to disk for later use. Copying with pressing Shift key provides simple 81 characters data in clipboard.
With Ctrl key (or Ctrl-X) provides compressed form.
Paste (or CTRL-V) to paste puzzle from clipboard. Format is simple tab separated text. You can paste, for example, using Excel and entering several givens in 9x9 cells. Also, it is possible to paste 81 characters form, 9 characters 9 lines, etc. In setup mode, it doesn't require resolvable puzzle and doesn't start play. Please use Play button to go play mode.
File > Append appends puzzle to NumPlPuzzle file.
File > Save as XML saves puzzle as XML for 'Number Place Generator'.
You can open the XML file by Puzzle File Viewer.
Append and Save as XML are enabled
by pressing Check button for resolvable puzzle.
You can use keyboard too. Showing key mapping as follows.
'0' or Delete key for removing number at cursor. '1' to '9' for entering number at cursor. Insert key for toggling pencil mark. Arrow keys for moving cursor. Space for toggling given selection. 'C' for Create. Esc key for Clear. 'S' for Setup, Solve or Start (depending on mode). '?' for Check. 'P' for Play. Ctrl-Z or Back Space key for Undo. Ctrl-Y or Tab key for Redo. End key for Stop. F1 key for Help.
File Viewer:
When viewer is opened by File > Open Viewer, file choosing dialog appears. NumPlPuzzle file is created by File > Append
or at puzzle creation in case Save all auto created puzzles enabled.
At the beginning, actual file name is NumPlPuzzle1.txt and the number after NumPlPuzzle will be incremented and new file will be created
when file grows and size exceeds 2,000,000.
It is also possible to open 'Number Place Generator' XML format file as long as puzzle format is standard 9x9.
There are following functions in popup context menu.
Play: starts play with selected puzzle on viewer.
It is applicable only before or after play and selected puzzle
is resolvable for the engine.
Select: copies selected puzzle into setup mode panel.
Copy: copies selected puzzle to clipboard.
Find: opens find dialog to find specific attribute puzzle in the file.
Open: shows file chooser dialog to open the other file.
Options: There are following choices.
Follow file growing reads file periodically
for appending puzzles and updates display.
Even it is selected, function will temporally be disabled
when popup or find dialog is shown.
No follow growing
Wrap long line wraps lines in window width.
No line wrap horizontal scroll bar appears unless window is wide enough.
Technical tips:
This program uses folder (directory) where program is installed as long as NumPl.jar is in sub folder named 'lib', otherwise it creates NumPl folder in your default location,
'My Documents' in Windows, and creates setting, puzzle save,
and/or play save files there.
Following commandline options are available:
f=folder rgb=color c=contrast g=gamma width p=puzzle
folder: changes location for files.
Your default location will be referred for relative path.
color: selects color. Specifying by RGB number in decimal or hex.
contrast: selects contrast (0 to 6).
gamma: selects gamma (0 to 8).
width: sets window size to the width and suitable height.
Specifying in number of pixels.
puzzle: presets puzzle go to paly mode at startup.
Format is compatible to data Copied with Shift or Ctrl pressed.
It is possible to embed Start button into HTML page as an applet. But typically there are restriction to access files/clibboard and related functions may not be available.
<applet code=puzzle.numpl.Launcher.class archive=NumPl.jar
width=120 height=40>
<param name=args value='commandline options'>
</applet>
Data format for Save all auto created puzzles and standard Copy/Paste:
Line 1: C=number of givens D=difficulty created or copied date time
Line 2-10: TAB separated 9 columns x 9 lines puzzle data
Line 11: A=right answer (81 characters)
Line 12: T=technique codes
Puzzle data codes: numbers (in current number style)
for the numbers in given cells, zeroes (0) for blank given cells,
others are blank.
Line 11-12 are copied only when difficulty is shown. Copying right after Solve function, numbers in answer cells are copied with lower case 'a' prefix.
At pasting, line 1 and 11-12 are ignored. They are not necessary in clipboard. Numbers with lower case 'a' prefix are also ignored. It is possible to paste data of which number style is different from present selection.
Simple and compressed clipboard data format:
Simple format: Total 81 characters, one each for cells left to right, top to bottom. Codes are numbers (1-9 regardless of number style selection) for the numbers in given cells, zeroes for blank given cells, and hyphens (minus) for answer cells.
At pasting, asterisk, plus, comma, period, slash, colon, semicolon, equal, and underline are able to be used as answer cell marks instead of hyphen. All spaces and line feeds are ignored. But in case pasting data is exact 81 characters including spaces, spaces are used as answer cell marks. In case there is no answer cell mark in data at all, zeroes are used as answer cell marks.
Compress format is compressing of the simple data by replacing contiguous hyphens with an alphabetic character, 'a' for 1 hyphen, 'b' for 2 hyphens, ... 'z' for 26 hyphens.
Solution for 'Reading file is too large for current Java memory setting.' It is solved by using java option -Xmx to increase memory for Java. In case of shortcut/link icons created by setup program, -Xmx100m is specified at target/command property. Please increase the '100' (it means 100 mega bytes).