This is the complete guide to using the Kudamono Editor. ^^ [KudamonoEditor完全ガイド|manual-ja] ^^


## Solver mode
images/paper-puzzle/drag-draw-erase.gif

Whereas [[click]] draws thicker *definitive* lines, [[auxclick]] produces auxiliary *trial* lines. Overlapping different line types will usually preserve only the most recent drawn line.

Some genres add [special drawing modes|kudamono/drawing-modes.html].


### Draw lines

There are two different ways of drawing lines:

#### Continually

[[drag]] on any grid point, then through an unmarked area to start drawing. Continue to grow the line in any direction.
If you make a mistake, keep dragging, but in the opposite direction, to shrink the line.

#### Segment by segment

[[click]] between two adjacent grid points to draw the segment connecting those points. Simply [[click]] again to erase it.


### Erase lines

There are three different ways of erasing lines:

#### Continually
[[drag]] along any line segment to start erasing. Keep dragging, in any cardinal direction, to erase other lines.
If you make a mistake, simply keep dragging, but in the opposite direction, to erase less of a line.

#### Segment by segment
[[click]] on any segment to erase it. 

#### With Shortcuts
The following shortcuts can be used:

SHORTCUT			EFFECT
[[del, s]]			Erase all *definitive* lines
[[del, t]]			Erase all *trial* lines
[[del]]				Erase all lines
[[finger-4-click]]		Erase all lines

### Place Auxiliary Marks

[[auxclick]] on a spot to place an auxiliary marker, or [[auxclick]] again to erase it. 

According to their precise position within or at the edge of a tile, different marker shapes may be produced.

images/paper-puzzle/aux-marks.gif

#### Aux mode

Alternatively, use [[ctrl space]] or the **Aux [[pencil]]** button to toggle //aux mode//. In //aux mode// you can:
- [[click]] to add auxiliary marks (e.g. crosses)
- [[drag]] to draw auxiliary lines


## Undo and Redo

### Undo
Press [[ctrl Z]] or [[ctrl shift Y]] to undo the last action, without limits. Alternative shortcuts: [[finger-2-left]] or pressing [[undo]].

### Redo
Press [[ctrl shift Z]] or [[ctrl Y]] to redo the last undone action. Alternative shortcut [[finger-2-right]] or pressing [[redo]].

Note that performing a new action after a certain number of undos will cause the old undone actions to be permanently forgotten. 


## Switch modes

All puzzles open in solver mode by default. You can swith to and from editor mode using the UI button or the following shortcuts:

SHORTCUT			EFFECT
[[space]]			toggle between editor and solver mode
[[middleclick]]		''
[[escape]]			exit editor mode into solver mode
[[finger-3-click]]	exit editor mode into solver mode
[[insert]]			enter editor mode from solver mode
[[ctrl space]]		toggle between aux and def mode

### By entering a symbol
Pressing any of the genre-specific symbol shortcuts will also trigger editor mode, with that symbol preselected.


## Editor mode

images/paper-puzzle/symbol-add-erase.gif

### Simple editing

#### Add symbol
Pick a symbol quickly with [[wheel-up]], [[wheel-down]], or the specific keyboard shortcuts to the genre (e.g [kudamono|kudamono.html#Kudamono Player], [bonsai|bonsai.html#Kudamono Player]).

Then [[click]] on an empty cell to add the chosen symbol there.
Starting from an empty cell, [[finger-drag]] to add many symbols at once. Dragging over another symbol will replace it by the new one.

#### Remove symbol
[[click]] on a symbol to remove it.
Starting from a symbol, [[drag]] to remove many symbols at once, irrespective of their type.

You may also erase all symbols at once with the following shortcuts

SHORTCUT			EFFECT
[[ctrl del]]			Erase all symbols
[[finger-5-click]]		Erase all symbols


### Bulk editing operations

All bulk operations depend on the geometry of the underlying grid. In square grids, there are two directions pairs: L (left) / R (right) and U (up) / D (down). In hexagonal grids, one extra direction pair exists: E (northeast) / W (southwest), approximately.

During bulk operations, any symbols or lines falling outside the board (even partially) won't be displayed. No data is lost though, just shift them back in to show them again. Only refreshing the page would erase them, since the URL only records what is visible.

#### Shift symbols or lines

Lines and symbols can be shifted together or separately.

---------------------------------------------------------------------------------------------------
images/paper-puzzle/move-lines.gif		images/paper-puzzle/move-symbols.gif		images/paper-puzzle/move-both.gif

${TableHtml({
	caption:"to shift symbols or lines",
	headers:["Action","Shortcut","UI Button"],
	rows:Group(
		["left","up","right","down"].map(L=>["shift all symbols one step "+L,K("ctrl "+L),"-"]),
		["left","up","right","down"].map(L=>["shift lines one step "+L,K("shift "+L)],"-"),
		["left","up","right","down"].map(L=>["shift everything one step "+L,K("ctrl shift "+L),K("move-"+L)])
	)
})}



#### Resize the board

|:info: These shortcuts only work in edit mode

${TableHtml({
	caption:"to resize the board",
	headers:["Action","Shortcut","UI button"],
	rows:Group(
		["left","up","right","down"].map(L=>["add a column to the "+L,K(L),K("expand-"+L)]),
		["left","up","right","down"].map(L=>["remove a column to the "+L,K("alt "+L),K("shrink-"+L)])
	)
})}

#### Rotate the board

images/paper-puzzle/rotate-both.gif

SHORTCUT		EFFECT
[[shift R]]		rotate the whole board counterclockwise
[[shift alt R]]	rotate the whole board clockwise


#### Mirror the board

To mirror the board, start by pressing [[shift m]] followed by the desired *orientation* of the mirror axis. 

SHORTCUT						EFFECT
[[shift M, shift up]]			mirror across the Up/Down axis
[[shift M, shift right]]		mirror across the Left/Right axis
[[shift M, shift pageup]]		mirror across the third axis, in hexagonal grids


#### Erase everything

Press [[ctrl shift del]] to erase all symbols and lines at once.


## Advanced options

SHORTCUT			EFFECT
[[resize]]			Alter the display size of the board
[[shift b]]			Toggle monochrome mode
[[shift x]]			Toggle error checking
[[alt shift x]]		Toggle decorations (positive confirmations)
[[shift c]]			Copy current URL containing puzzle
[[ctrl shift c]]	Copy just the **puzzlestring**
[[ctrl v]]			Load **puzzlestring** or URL

These options are explained below.

### Display size

The editor will by default fill the entire browser viewport. Simply resize it to change the display size. Optionally, detach the current tab to its own new window.

### Monochrome mode
A special //Monochrome// mode is available. This mode desaturates all colours, reducing them to black, white and shades of gray. This may be useful for printing and sharing images of the puzzles, or to detect visual accessibility issues (e.g. colourblindness). 

In genres where colour plays an major role, special modifications may be added, such as:
- in [color-mazes], colours are replaced by textures
- in [decoration-tree], colours are assigned to numbers


### Error checking
Error checking is active by default. Turning it off will increase performance at the expense of functionality -- for example, you will not get a **winning confirmation** when the error checker is off (or immediately after turning it on).

### Save a URL of the puzzle
You can copy the entire URL to save the current puzzle state for later or to share with others, eg. on [PuzzleSquareJP|https://puzsq.logicpuzzle.app].

You can also copy just the **puzzlestring** (the portion of the URL containing the puzzle board and metadata) which can be used for puzzle archival.






## Metadata
As soon as you start editing a puzzle, you may notice some metadata fields light up just below it. The [#main fields] should be edited, then there are many [#optional fields].

### Main Fields
#### A: Author
Each puzzle should have one or several author name(s).
#####Author input
Author names should be written in free text. To separate names of different authors, use commas. Some authors already have a personal or social media page associated with their names, in which case they will be displayed as a clickable link.

#### D: Date
Each puzzle must have a date, otherwise it defaults to today's.

##### Date input
You can simply write the date in free text :::experimental. Shall it be parsed wrongly, it can also be input in the formats: DD-MM-YYYY, YYYY-MM-DD.

#### T: Title / Theme
Each puzzle should have a title (or theme), which should be more descriptive than simply "Puzzle". Given the effort that goes into making a unique puzzle, why not give it a unique, memorable title too?

##### Title input
Please note that underscores will be converted to spaces, so you can copy the URL and paste it directly into any chat window without resulting in a (literally) broken URL.

### Optional Fields

#### B: Transcribed by
To credit someone who took the effort to transcribe the puzzle of another author. Same format as the author field.

#### F: Difficulty
Puzzles may be classified as ${Enumerate(ThreadKeysValues({"tutorial":1,"easy":2,"medium":3,"hard":4,"evil":5},(diff,n)=>diff+" "+Glyph("asterisk-heavy").repeat(n)))}.

##### Difficulty input
Difficulty can be written in free text, or, shall it fail to parse, directly as a number from 1 to 5.

#### K: Kudos
To thank someone, e.g for:
	- checking puzzle uniqueness, finding mistakes;
	- helping constructing a puzzle
	- providing inspiration or ideas

##### Kudos input
Simply list names as in [#Author Input]. Names will complete the sentence "With thanks to..."

#### O: Observations
Each puzzle may have some observations, that could be useful to clarify some aspect of the puzzle, for instance some puzzles have some extra, special rules.

##### Observations input
Write anything here. Observations are always shown within parentheses. The same parsing used in [#Title Input] applies.

#### U: Url
If you wish to associate a link with your puzzle, you can do so in the URL field.
The link should be different from the one added automatically as part of the author field, if any.

##### Url input
Write or paste the url directly.