Documentation
¶
Overview ¶
Package pcn implements encoding and decoding of pure coordinate notation (PCN).
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
Encode encodes a move as a PCN string.
Example ¶
moves := []core.Move{ // Double pawn push. {From: core.B2, To: core.B4}, // Queen promotion. {From: core.F2, To: core.F1, Promotion: core.Queen}, // White short castle. {From: core.E1, To: core.G1}, } for _, m := range moves { fmt.Println(Encode(m)) }
Output: b2b4 f2f1q e1g1
func MustDecode ¶
MustDecode is like Decode but panics if the PCN is invalid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.