summaryrefslogtreecommitdiffstats
path: root/share/man/man6/chess-init.6
blob: 79678145b4cdf0218879187384204c8083707fb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.\" Copyright (c) 2022 by Alejandro Colomar <alx.manpages@gmail.com>
.\" SPDX-License-Identifier: GPL-2.0
.\"
.TH CHESS-INIT 6 2022-01-23 chessutils "Games Manual"
.SH NAME
chess\-init \- initialize a chess game
.SH SYNOPSIS
.B chess\-init
.SH DESCRIPTION
.MR chess\-init 6
prints an initial chess game to standard output,
which can later be used (read) by other
.I chessutils
filter programs to play chess.
.PP
The game uses a simple text representation of the board and pieces,
where each cell is represented exactly by one character.
Alphabetic (\c
.MR isalpha 3 )
characters represent pieces.
Uppercase (\c
.MR isupper 3 )
characters represent black pieces.
Lowercase (\c
.MR islower 3 )
characters represent white pieces.
Non-alphabetic characters are used for empty board cells.
.PP
Valid characters:
.TP
Board:
.RS
.TP
.B \(aq \(aq
Empty black cell.
.TP
.B \(aq\-\(aq
Empty white cell.
.RE
.TP
Pieces:
.RS
.TP
.BR B ", " b
Bishop.
.TP
.BR K ", " k
King.
.TP
.BR N ", " n
Knight.
.TP
.BR P ", " p
Pawn.
.TP
.BR Q ", " q
Queen.
.TP
.BR R ", " r
Rook.
.RE
.PP
The board is printed in a standard orientation,
such that cell
.I a1
is bottom left,
and
.I h1
is bottom right.
.SH EXIT STATUS
On success, the program exits with a status of
.BR EXIT_SUCCESS .
On error, one of the following values can be returned.
.SH ERRORS
.TP
.B EX_IOERR
A write to standard output failed.
.PP
(See
.MR sysexits.h 0 .)
.SH EXAMPLES
.EX
$ chess\-init
RNBQKBNR
PPPPPPPP
\- \- \- \- 
 \- \- \- \-
\- \- \- \- 
 \- \- \- \-
pppppppp
rnbqkbnr
.EE
.SH AUTHORS
.I chessutils
was written by
.MT alx.manpages@gmail.com
Alejandro Colomar
.ME .
.SH REPORTING BUGS
Please send inline patches to the author.
The source code can be found at the project
.UR http://www.alejandro\-colomar.es/src/alx/alx/games/chessutils.git
homepage
.UE .
.SH COPYRIGHT
Copyright (c) 2022 by
.MT alx.manpages@gmail.com
Alejandro Colomar
.ME .
.PP
SPDX-License-Identifier:
.B GPL-2.0
.SH SEE ALSO
.MR chess\-lsmv 6 ,
.MR chess\-mv 6