f0ba1db Fix typo
~shreyasminocha pushed to ~shreyasminocha/kaleidoscope-spec git
6a19e76 Add license
~shreyasminocha pushed to ~shreyasminocha/kaleidoscope-spec git
18 pieces. 8×8 grid.
This document specifies a concise, human-readable, machine-parsable representation of KC puzzles and KC solutions.
Note: the BNFs here specify a superset of the valid representations. In other words, a representation deemed valid by the BNF may or may not actually be valid. However, a representation deemed invalid by the BNF is necessarily invalid.
Symbol | Colour |
---|---|
K |
Black |
R |
Red |
B |
Blue |
Y |
Yellow |
Square ::= 'K' | 'R' | 'B' | 'Y'
PuzzleRow ::= (Square){8}
Puzzle ::= (PuzzleRow '\n'){8}
Example:
KYKBKYKB
YKRKRKRK
KRKRKRKY
BKRKRKRK
KRKRKRKB
YKRKRKRK
KRKRKRKY
BKYKBKYK
A puzzle representation followed by a description of the arrangement of the pieces.
Map each of the eighteen pieces to a unique, alphanumeric (a-zA-Z0-9
) character. Next, for each piece, represent every squared occupied by the piece with its designated character.
PieceComponent ::= [a-zA-Z0-9]
ArrangementRow ::= (PieceComponent){8}
Arrangement ::= (ArrangementRow '\n'){8}
Solution ::= Puzzle '\n'+ Arrangement
Example:
KYKBKYKB
YKRKRKRK
KRKRKRKY
BKRKRKRK
KRKRKRKB
YKRKRKRK
KRKRKRKY
BKYKBKYK
adddkkkr
aeedjklr
afeejllr
bffjjmmq
bgfiinnp
bgghinnp
bghhhopp
cccccccc
[
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>,
<piece>
]
{
[name]: [ // red-black
[], // row
[], // row
[], // row
],
[name.toUppercase()]: [ // black-blue-yellow
[], // row
[], // row
[], // row
]
}
Licensed under CC0.